rust/src/test/ui/self/self-infer.stderr

38 lines
1.1 KiB
Plaintext
Raw Normal View History

error[E0121]: the type placeholder `_` is not allowed within types on item signatures
--> $DIR/self-infer.rs:4:16
|
LL | fn f(self: _) {}
| ^ not allowed in type signatures
2018-08-08 12:28:26 +00:00
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
2018-12-25 15:56:47 +00:00
--> $DIR/self-infer.rs:4:16
2018-08-08 12:28:26 +00:00
|
2019-03-09 12:03:44 +00:00
LL | fn f(self: _) {}
| ^ not allowed in type signatures
|
help: use type parameters instead
|
LL | fn f<T>(self: T) {}
| ^^^ ^
2018-08-08 12:28:26 +00:00
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
--> $DIR/self-infer.rs:6:17
|
LL | fn g(self: &_) {}
| ^ not allowed in type signatures
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
--> $DIR/self-infer.rs:6:17
2018-08-08 12:28:26 +00:00
|
2019-03-09 12:03:44 +00:00
LL | fn g(self: &_) {}
| ^ not allowed in type signatures
|
help: use type parameters instead
|
LL | fn g<T>(self: &T) {}
| ^^^ ^
2018-08-08 12:28:26 +00:00
error: aborting due to 4 previous errors
2018-08-08 12:28:26 +00:00
For more information about this error, try `rustc --explain E0121`.