-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Code
struct X;
impl std::fmt::Display for X {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "x")
}
}
fn main() {
let x = X;
println!("test: {x} {x:?}");
}
Current output
error[E0277]: `X` doesn't implement `Debug`
--> src/main.rs:11:22
|
11 | println!("test: {x} {x:?}");
| ^ `X` cannot be formatted using `{:?}`
Desired output
error[E0277]: `X` doesn't implement `Debug`
--> src/main.rs:11:22
|
11 | println!("test: {x} {x:?}");
| ^ `X` cannot be formatted using `{:?}`
Rationale and extra context
No response
Other cases
No response
Anything else?
compiler-errors
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.