fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #69854 - pietroalbini:stable-next, r=Centrilb8cedc00407

1.42.0
1.1 KiB37 linesraw
1error[E0121]: the type placeholder `_` is not allowed within types on item signatures
2  --> $DIR/self-infer.rs:4:16
3   |
4LL |     fn f(self: _) {}
5   |                ^ not allowed in type signatures
6
7error[E0121]: the type placeholder `_` is not allowed within types on item signatures
8  --> $DIR/self-infer.rs:4:16
9   |
10LL |     fn f(self: _) {}
11   |                ^ not allowed in type signatures
12   |
13help: use type parameters instead
14   |
15LL |     fn f<T>(self: T) {}
16   |         ^^^       ^
17
18error[E0121]: the type placeholder `_` is not allowed within types on item signatures
19  --> $DIR/self-infer.rs:6:17
20   |
21LL |     fn g(self: &_) {}
22   |                 ^ not allowed in type signatures
23
24error[E0121]: the type placeholder `_` is not allowed within types on item signatures
25  --> $DIR/self-infer.rs:6:17
26   |
27LL |     fn g(self: &_) {}
28   |                 ^ not allowed in type signatures
29   |
30help: use type parameters instead
31   |
32LL |     fn g<T>(self: &T) {}
33   |         ^^^        ^
34
35error: aborting due to 4 previous errors
36
37For more information about this error, try `rustc --explain E0121`.