2023-02-23 11:27:06 -06:00
|
|
|
error[E0107]: function takes 0 generic arguments but 1 generic argument was supplied
|
2022-08-04 17:43:39 -05:00
|
|
|
--> $DIR/issue-100154.rs:4:5
|
|
|
|
|
|
|
|
|
LL | foo::<()>(());
|
2024-07-22 17:51:53 -05:00
|
|
|
| ^^^------ help: remove the unnecessary generics
|
|
|
|
| |
|
|
|
|
| expected 0 generic arguments
|
2022-08-04 17:43:39 -05:00
|
|
|
|
|
|
|
|
note: function defined here, with 0 generic parameters
|
|
|
|
--> $DIR/issue-100154.rs:1:4
|
|
|
|
|
|
|
|
|
LL | fn foo(i: impl std::fmt::Display) {}
|
|
|
|
| ^^^
|
|
|
|
= note: `impl Trait` cannot be explicitly specified as a generic argument
|
|
|
|
|
|
|
|
error[E0277]: `()` doesn't implement `std::fmt::Display`
|
2023-08-26 14:25:46 -05:00
|
|
|
--> $DIR/issue-100154.rs:4:11
|
2022-08-04 17:43:39 -05:00
|
|
|
|
|
|
|
|
LL | foo::<()>(());
|
2023-08-26 14:25:46 -05:00
|
|
|
| ^^ `()` cannot be formatted with the default formatter
|
2022-08-04 17:43:39 -05:00
|
|
|
|
|
|
|
|
= help: the trait `std::fmt::Display` is not implemented for `()`
|
|
|
|
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
|
|
|
|
note: required by a bound in `foo`
|
|
|
|
--> $DIR/issue-100154.rs:1:16
|
|
|
|
|
|
|
|
|
LL | fn foo(i: impl std::fmt::Display) {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^ required by this bound in `foo`
|
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|
|
|
|
Some errors have detailed explanations: E0107, E0277.
|
|
|
|
For more information about an error, try `rustc --explain E0107`.
|