Add more complex test cases for new suggestion

This commit is contained in:
Tom Martin 2023-04-07 04:22:43 +01:00
parent be4416923d
commit 5c5c3c9527
No known key found for this signature in database
GPG Key ID: 73A733F9629F5AC5
2 changed files with 40 additions and 0 deletions

View File

@ -0,0 +1,10 @@
#[derive(Clone, Debug)] // OK
struct S;
#[derive(Debug, inline)] //~ ERROR expected derive macro, found built-in attribute `inline`
struct T;
#[derive(inline, Debug)] //~ ERROR expected derive macro, found built-in attribute `inline`
struct U;
fn main() {}

View File

@ -0,0 +1,30 @@
error: expected derive macro, found built-in attribute `inline`
--> $DIR/macro-path-prelude-fail-5.rs:4:17
|
LL | #[derive(Debug, inline)]
| ^^^^^^ not a derive macro
|
help: remove from the surrounding `derive()`
--> $DIR/macro-path-prelude-fail-5.rs:4:17
|
LL | #[derive(Debug, inline)]
| ^^^^^^
= help: add as non-Derive macro
`#[inline]`
error: expected derive macro, found built-in attribute `inline`
--> $DIR/macro-path-prelude-fail-5.rs:7:10
|
LL | #[derive(inline, Debug)]
| ^^^^^^ not a derive macro
|
help: remove from the surrounding `derive()`
--> $DIR/macro-path-prelude-fail-5.rs:7:10
|
LL | #[derive(inline, Debug)]
| ^^^^^^
= help: add as non-Derive macro
`#[inline]`
error: aborting due to 2 previous errors