File tree 2 files changed +30
-0
lines changed
2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change
1
+ use std:: fmt:: Debug ;
2
+
3
+ #[ derive( Debug ) ] //~ ERROR expected struct, variant or union type, found type parameter `Irrelevant`
4
+ pub struct Irrelevant < Irrelevant > { //~ ERROR type arguments are not allowed for this type
5
+ irrelevant : Irrelevant ,
6
+ }
7
+
8
+ fn main ( ) { }
Original file line number Diff line number Diff line change
1
+ error[E0574]: expected struct, variant or union type, found type parameter `Irrelevant`
2
+ --> $DIR/issue-97343.rs:3:10
3
+ |
4
+ LL | #[derive(Debug)]
5
+ | ^^^^^ not a struct, variant or union type
6
+ |
7
+ = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
8
+
9
+ error[E0109]: type arguments are not allowed for this type
10
+ --> $DIR/issue-97343.rs:4:23
11
+ |
12
+ LL | #[derive(Debug)]
13
+ | ----- in this derive macro expansion
14
+ LL | pub struct Irrelevant<Irrelevant> {
15
+ | ^^^^^^^^^^ type argument not allowed
16
+ |
17
+ = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
18
+
19
+ error: aborting due to 2 previous errors
20
+
21
+ Some errors have detailed explanations: E0109, E0574.
22
+ For more information about an error, try `rustc --explain E0109`.
You can’t perform that action at this time.
0 commit comments