rust/tests/ui/suggestions/bad-infer-in-trait-impl.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
764 B
Plaintext
Raw Normal View History

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`.