Closed
Description
In case there is an undeclared lifetime in an ADT deriving Eq
a wrong help message is emited
#[derive(Eq, PartialEq)]
struct Test {
a: &'b str,
}
causes the following error
error[E0261]: use of undeclared lifetime name `'b`
--> src/lib.rs:3:9
|
2 | struct Test {
| - help: consider introducing lifetime `'b` here: `<'b>`
3 | a: &'b str,
| ^^ undeclared lifetime
error[E0261]: use of undeclared lifetime name `'b`
--> src/lib.rs:3:9
|
3 | a: &'b str,
| ^^ undeclared lifetime
|
help: consider introducing lifetime `'b` here
|
1 | #[derive(<'b>, PartialEq)]
| ^^^^
help: consider introducing lifetime `'b` here
|
1 | #[derive(<'b>, PartialEq)]
| ^^^^
thx, bye
Metadata
Metadata
Assignees
Labels
Area: Messages for errors, warnings, and lintsArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)Area: Suggestions generated by the compiler applied by `cargo fix`Category: This is a bug.Diagnostics: A structured suggestion resulting in incorrect code.Relevant to the compiler team, which will review and decide on the PR/issue.