You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following code fails to compile. Similar code compiles if the associated type's name is different from the struct field's name, although these two things should have no bearing on one another.
error[E0277]: `PathBuf` doesn't implement `std::fmt::Display` --> src/main.rs:16:10 |15 | #[derive(Error, Debug)] | ----- in this derive macro expansion16 | #[error("{A} {b}", b = &0 as &dyn Trait<i32, A = i32>)] | ^^^ `PathBuf` cannot be formatted with the default formatter; call `.display()` on it | = help: the trait `std::fmt::Display` is not implemented for `PathBuf` = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead = note: call `.display()` or `.to_string_lossy()` to safely print paths, as they may contain non-Unicode data = note: this error originates in the macro `$crate::format_args` which comes from the expansion of the derive macro `Error` (in Nightly builds, run with -Z macro-backtrace for more info)
The text was updated successfully, but these errors were encountered:
The following code fails to compile. Similar code compiles if the associated type's name is different from the struct field's name, although these two things should have no bearing on one another.
The text was updated successfully, but these errors were encountered: