mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-29 02:03:53 +00:00
25 lines
764 B
Plaintext
25 lines
764 B
Plaintext
error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
|
|
--> $DIR/bad-infer-in-trait-impl.rs:6:15
|
|
|
|
|
LL | fn bar(s: _) {}
|
|
| ^ not allowed in type signatures
|
|
|
|
|
help: use type parameters instead
|
|
|
|
|
LL | fn bar<T>(s: T) {}
|
|
| +++ ~
|
|
|
|
error[E0050]: method `bar` has 1 parameter but the declaration in trait `Foo::bar` has 0
|
|
--> $DIR/bad-infer-in-trait-impl.rs:6:15
|
|
|
|
|
LL | fn bar();
|
|
| --------- trait requires 0 parameters
|
|
...
|
|
LL | fn bar(s: _) {}
|
|
| ^ expected 0 parameters, found 1
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
Some errors have detailed explanations: E0050, E0121.
|
|
For more information about an error, try `rustc --explain E0050`.
|