blob: 48111f4d3a14028a7a20aecb8d35a609cd6e2f2b [file] [edit]
error: expected non-macro attribute, found attribute macro `derive`
--> $DIR/derive-macro-invalid-placement.rs:5:10
|
LL | fn foo<#[derive(Debug)] T>() {
| ^^^^^^ not a non-macro attribute
error: expected non-macro attribute, found attribute macro `derive`
--> $DIR/derive-macro-invalid-placement.rs:7:11
|
LL | #[derive(Debug)]
| ^^^^^^ not a non-macro attribute
error[E0774]: `derive` may only be applied to `struct`s, `enum`s and `union`s
--> $DIR/derive-macro-invalid-placement.rs:19:5
|
LL | #[derive(Debug)]
| ^^^^^^^^^^^^^^^^ not applicable here
LL | println!("Hello, world!");
| -------------------------- not a `struct`, `enum` or `union`
error[E0774]: `derive` may only be applied to `struct`s, `enum`s and `union`s
--> $DIR/derive-macro-invalid-placement.rs:23:5
|
LL | #[derive(Debug)]
| ^^^^^^^^^^^^^^^^ not applicable here
LL | "Hello, world!";
| ---------------- not a `struct`, `enum` or `union`
error[E0774]: `derive` may only be applied to `struct`s, `enum`s and `union`s
--> $DIR/derive-macro-invalid-placement.rs:27:5
|
LL | #[derive(Debug)]
| ^^^^^^^^^^^^^^^^ not applicable here
LL | let _ = "Hello, world!";
| ------------------------ not a `struct`, `enum` or `union`
error[E0774]: `derive` may only be applied to `struct`s, `enum`s and `union`s
--> $DIR/derive-macro-invalid-placement.rs:31:13
|
LL | let _ = #[derive(Debug)] "Hello, world!";
| ^^^^^^^^^^^^^^^^ --------------- not a `struct`, `enum` or `union`
| |
| not applicable here
error[E0774]: `derive` may only be applied to `struct`s, `enum`s and `union`s
--> $DIR/derive-macro-invalid-placement.rs:36:9
|
LL | #[derive(Debug)]
| ^^^^^^^^^^^^^^^^ not applicable here
LL | "Hello, world!",
| --------------- not a `struct`, `enum` or `union`
error: aborting due to 7 previous errors
For more information about this error, try `rustc --explain E0774`.