Add more complex test cases for new suggestion
This commit is contained in:
parent
be4416923d
commit
5c5c3c9527
10
tests/ui/macros/macro-path-prelude-fail-5.rs
Normal file
10
tests/ui/macros/macro-path-prelude-fail-5.rs
Normal 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() {}
|
30
tests/ui/macros/macro-path-prelude-fail-5.stderr
Normal file
30
tests/ui/macros/macro-path-prelude-fail-5.stderr
Normal 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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user