File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ struct S(String);
13
13
impl S {
14
14
fn f ( self : * mut S ) -> String { self . 0 }
15
15
//~^ ERROR invalid `self` type
16
+ //~| ERROR arbitrary `self` types are unstable
16
17
}
17
18
18
19
fn main ( ) { S ( "" . to_owned ( ) ) . f ( ) ; }
Original file line number Diff line number Diff line change @@ -15,7 +15,9 @@ struct Foo {
15
15
}
16
16
17
17
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
19
21
self . f + x
20
22
}
21
23
}
@@ -25,10 +27,14 @@ struct Bar<T> {
25
27
}
26
28
27
29
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
29
33
x
30
34
}
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
32
38
x
33
39
}
34
40
}
You can’t perform that action at this time.
0 commit comments