-
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 lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.
Description
Consider this code:
struct Foo;
fn main() {
println!("{:?} {:?}",
/* 1 */ Foo,
/* 2 */ std::fs::OpenOptions::new());
}
Both marked lines print the error that Debug
is not satisfied and note that "if it is defined in your crate, add #[derive(Debug)]
or manually implement it". The compiler should be able to check and issue the note only for (1), instead of printing the confusing "if it is defined in your crate".
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.