mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
24 lines
764 B
Text
24 lines
764 B
Text
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`.
|