1
Fork 0
rust/tests/ui/impl-trait/in-trait/doesnt-satisfy.stderr
Nicholas Nethercote cdf5b8d4e7 Change how anonymous associated types are printed.
Give them their own symbol `anon_assoc`, as is done for all the other
anonymous `DefPathData` variants.
2025-04-11 20:13:16 +10:00

17 lines
705 B
Text

error[E0277]: `()` doesn't implement `std::fmt::Display`
--> $DIR/doesnt-satisfy.rs:6:17
|
LL | fn bar() -> () {}
| ^^ `()` cannot be formatted with the default formatter
|
= 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::{anon_assoc#0}`
--> $DIR/doesnt-satisfy.rs:2:22
|
LL | fn bar() -> impl std::fmt::Display;
| ^^^^^^^^^^^^^^^^^ required by this bound in `Foo::{anon_assoc#0}`
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.