File tree Expand file tree Collapse file tree 2 files changed +44
-0
lines changed Expand file tree Collapse file tree 2 files changed +44
-0
lines changed Original file line number Diff line number Diff line change
1
+ // compile-flags: -Z deduplicate-diagnostics=yes
2
+
3
+ #![ warn( unused_imports) ]
4
+ //~^ NOTE lint level
5
+
6
+ mod hey {
7
+ pub trait Serialize { }
8
+ }
9
+
10
+ use hey:: Serialize ;
11
+ //~^ WARNING unused import
12
+ //~| NOTE `Serialize` is imported here
13
+
14
+ #[ derive( Serialize ) ]
15
+ //~^ ERROR cannot find derive macro `Serialize`
16
+ struct A ;
17
+
18
+ fn main ( ) { }
Original file line number Diff line number Diff line change
1
+ error: cannot find derive macro `Serialize` in this scope
2
+ --> $DIR/issue-88206.rs:14:10
3
+ |
4
+ LL | #[derive(Serialize)]
5
+ | ^^^^^^^^^
6
+ |
7
+ note: `Serialize` is imported here, but it is not a derive macro
8
+ --> $DIR/issue-88206.rs:10:5
9
+ |
10
+ LL | use hey::Serialize;
11
+ | ^^^^^^^^^^^^^^
12
+
13
+ warning: unused import: `hey::Serialize`
14
+ --> $DIR/issue-88206.rs:10:5
15
+ |
16
+ LL | use hey::Serialize;
17
+ | ^^^^^^^^^^^^^^
18
+ |
19
+ note: the lint level is defined here
20
+ --> $DIR/issue-88206.rs:3:9
21
+ |
22
+ LL | #![warn(unused_imports)]
23
+ | ^^^^^^^^^^^^^^
24
+
25
+ error: aborting due to previous error; 1 warning emitted
26
+
You can’t perform that action at this time.
0 commit comments