Skip to content

Commit 6fd2156

Browse files
committed
Add arbitrary_self_types feature gate error to some tests
1 parent aa0df3d commit 6fd2156

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

src/test/compile-fail/issue-26194.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ struct S(String);
1313
impl S {
1414
fn f(self: *mut S) -> String { self.0 }
1515
//~^ ERROR invalid `self` type
16+
//~| ERROR arbitrary `self` types are unstable
1617
}
1718

1819
fn main() { S("".to_owned()).f(); }

src/test/compile-fail/ufcs-explicit-self-bad.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ struct Foo {
1515
}
1616

1717
impl Foo {
18-
fn foo(self: isize, x: isize) -> isize { //~ ERROR invalid `self` type
18+
fn foo(self: isize, x: isize) -> isize {
19+
//~^ ERROR invalid `self` type
20+
//~| ERROR arbitrary `self` types are unstable
1921
self.f + x
2022
}
2123
}
@@ -25,10 +27,14 @@ struct Bar<T> {
2527
}
2628

2729
impl<T> Bar<T> {
28-
fn foo(self: Bar<isize>, x: isize) -> isize { //~ ERROR invalid `self` type
30+
fn foo(self: Bar<isize>, x: isize) -> isize {
31+
//~^ ERROR invalid `self` type
32+
//~| ERROR arbitrary `self` types are unstable
2933
x
3034
}
31-
fn bar(self: &Bar<usize>, x: isize) -> isize { //~ ERROR invalid `self` type
35+
fn bar(self: &Bar<usize>, x: isize) -> isize {
36+
//~^ ERROR invalid `self` type
37+
//~| ERROR arbitrary `self` types are unstable
3238
x
3339
}
3440
}

0 commit comments

Comments
 (0)