Add test for #97343

This commit is contained in:
Esteban Küber 2022-05-27 10:47:05 -07:00
parent b2c9872c6c
commit d21bc6562a
2 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,8 @@
use std::fmt::Debug;
#[derive(Debug)] //~ ERROR expected struct, variant or union type, found type parameter `Irrelevant`
pub struct Irrelevant<Irrelevant> { //~ ERROR type arguments are not allowed for this type
irrelevant: Irrelevant,
}
fn main() {}

View File

@ -0,0 +1,22 @@
error[E0574]: expected struct, variant or union type, found type parameter `Irrelevant`
--> $DIR/issue-97343.rs:3:10
|
LL | #[derive(Debug)]
| ^^^^^ not a struct, variant or union type
|
= note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0109]: type arguments are not allowed for this type
--> $DIR/issue-97343.rs:4:23
|
LL | #[derive(Debug)]
| ----- in this derive macro expansion
LL | pub struct Irrelevant<Irrelevant> {
| ^^^^^^^^^^ type argument not allowed
|
= note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to 2 previous errors
Some errors have detailed explanations: E0109, E0574.
For more information about an error, try `rustc --explain E0109`.