Skip to content

Commit 5c5c3c9

Browse files
committed
Add more complex test cases for new suggestion
1 parent be44169 commit 5c5c3c9

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#[derive(Clone, Debug)] // OK
2+
struct S;
3+
4+
#[derive(Debug, inline)] //~ ERROR expected derive macro, found built-in attribute `inline`
5+
struct T;
6+
7+
#[derive(inline, Debug)] //~ ERROR expected derive macro, found built-in attribute `inline`
8+
struct U;
9+
10+
fn main() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
error: expected derive macro, found built-in attribute `inline`
2+
--> $DIR/macro-path-prelude-fail-5.rs:4:17
3+
|
4+
LL | #[derive(Debug, inline)]
5+
| ^^^^^^ not a derive macro
6+
|
7+
help: remove from the surrounding `derive()`
8+
--> $DIR/macro-path-prelude-fail-5.rs:4:17
9+
|
10+
LL | #[derive(Debug, inline)]
11+
| ^^^^^^
12+
= help: add as non-Derive macro
13+
`#[inline]`
14+
15+
error: expected derive macro, found built-in attribute `inline`
16+
--> $DIR/macro-path-prelude-fail-5.rs:7:10
17+
|
18+
LL | #[derive(inline, Debug)]
19+
| ^^^^^^ not a derive macro
20+
|
21+
help: remove from the surrounding `derive()`
22+
--> $DIR/macro-path-prelude-fail-5.rs:7:10
23+
|
24+
LL | #[derive(inline, Debug)]
25+
| ^^^^^^
26+
= help: add as non-Derive macro
27+
`#[inline]`
28+
29+
error: aborting due to 2 previous errors
30+

0 commit comments

Comments
 (0)