2023-03-15 23:02:56 -05:00
|
|
|
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) {}
|
|
|
|
| +++ ~
|
|
|
|
|
2023-10-31 08:45:26 -05:00
|
|
|
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
|
2023-03-15 23:02:56 -05:00
|
|
|
|
2023-10-31 08:45:26 -05:00
|
|
|
Some errors have detailed explanations: E0050, E0121.
|
|
|
|
For more information about an error, try `rustc --explain E0050`.
|