mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 14:31:55 +00:00
a5b639dc01
Consider `tests/ui/const-generics/generic_const_exprs/issue-102768.stderr`, the error message where it gives additional notes about where the associated type is defined, and how the dead code lint doesn't have an article, like in `tests/ui/lint/dead-code/issue-85255.stderr`. They don't have articles, so it seems unnecessary to have one here.
36 lines
1.2 KiB
Plaintext
36 lines
1.2 KiB
Plaintext
error[E0107]: function takes 0 generic arguments but 1 generic argument was supplied
|
|
--> $DIR/issue-100154.rs:4:5
|
|
|
|
|
LL | foo::<()>(());
|
|
| ^^^------ help: remove these generics
|
|
| |
|
|
| expected 0 generic arguments
|
|
|
|
|
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`
|
|
--> $DIR/issue-100154.rs:4:15
|
|
|
|
|
LL | foo::<()>(());
|
|
| --------- ^^ `()` cannot be formatted with the default formatter
|
|
| |
|
|
| required by a bound introduced by this call
|
|
|
|
|
= 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`.
|