Add arbitrary_self_types feature gate error to some tests
This commit is contained in:
parent
aa0df3da3d
commit
6fd215647d
|
@ -13,6 +13,7 @@ struct S(String);
|
|||
impl S {
|
||||
fn f(self: *mut S) -> String { self.0 }
|
||||
//~^ ERROR invalid `self` type
|
||||
//~| ERROR arbitrary `self` types are unstable
|
||||
}
|
||||
|
||||
fn main() { S("".to_owned()).f(); }
|
||||
|
|
|
@ -15,7 +15,9 @@ struct Foo {
|
|||
}
|
||||
|
||||
impl Foo {
|
||||
fn foo(self: isize, x: isize) -> isize { //~ ERROR invalid `self` type
|
||||
fn foo(self: isize, x: isize) -> isize {
|
||||
//~^ ERROR invalid `self` type
|
||||
//~| ERROR arbitrary `self` types are unstable
|
||||
self.f + x
|
||||
}
|
||||
}
|
||||
|
@ -25,10 +27,14 @@ struct Bar<T> {
|
|||
}
|
||||
|
||||
impl<T> Bar<T> {
|
||||
fn foo(self: Bar<isize>, x: isize) -> isize { //~ ERROR invalid `self` type
|
||||
fn foo(self: Bar<isize>, x: isize) -> isize {
|
||||
//~^ ERROR invalid `self` type
|
||||
//~| ERROR arbitrary `self` types are unstable
|
||||
x
|
||||
}
|
||||
fn bar(self: &Bar<usize>, x: isize) -> isize { //~ ERROR invalid `self` type
|
||||
fn bar(self: &Bar<usize>, x: isize) -> isize {
|
||||
//~^ ERROR invalid `self` type
|
||||
//~| ERROR arbitrary `self` types are unstable
|
||||
x
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue