Closed
Description
Meta
This occurs in 539f208 (from 13-09) and 1.21 beta, but not on stable
STR
#[derive(Debug)]
pub struct X;
impl Add for X {} // trigger unused import
fn main() {}
Expected result
On stable, you get a correct candidate suggestion:
Compiling playground v0.0.1 (file:///playground)
error[E0405]: cannot find trait `Add` in this scope
--> src/main.rs:4:6
|
4 | impl Add for X {} // trigger unused import
| ^^^ not found in this scope
|
help: possible candidate is found in another module, you can import it into scope
|
1 | use std::ops::Add;
|
Actual Result
The suggestion contains a stray derive
:
Compiling playground v0.0.1 (file:///playground)
error[E0405]: cannot find trait `Add` in this scope
--> src/main.rs:4:6
|
4 | impl Add for X {} // trigger unused import
| ^^^ not found in this scope
|
help: possible candidate is found in another module, you can import it into scope
|
1 | #[derive(use std::ops::Add; <--- STRAY DERIVE IN SUGGESTION
|