diff options
Diffstat (limited to 'src/test/ui/span')
| -rw-r--r-- | src/test/ui/span/issue-43927-non-ADT-derive.rs | 7 | ||||
| -rw-r--r-- | src/test/ui/span/issue-43927-non-ADT-derive.stderr | 31 | ||||
| -rw-r--r-- | src/test/ui/span/macro-ty-params.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/span/macro-ty-params.stderr | 2 |
4 files changed, 7 insertions, 35 deletions
diff --git a/src/test/ui/span/issue-43927-non-ADT-derive.rs b/src/test/ui/span/issue-43927-non-ADT-derive.rs index 8f1599a5abc..840c12e16e1 100644 --- a/src/test/ui/span/issue-43927-non-ADT-derive.rs +++ b/src/test/ui/span/issue-43927-non-ADT-derive.rs @@ -1,10 +1,5 @@ -#![allow(dead_code)] - #![derive(Debug, PartialEq, Eq)] // should be an outer attribute! -//~^ ERROR `derive` may only be applied to structs, enums and unions -//~| ERROR cannot determine resolution for the derive macro `Debug` -//~| ERROR cannot determine resolution for the derive macro `PartialEq` -//~| ERROR cannot determine resolution for the derive macro `Eq` +//~^ ERROR cannot determine resolution for the attribute macro `derive` struct DerivedOn; fn main() {} diff --git a/src/test/ui/span/issue-43927-non-ADT-derive.stderr b/src/test/ui/span/issue-43927-non-ADT-derive.stderr index 85beac535c9..9ef81c5150a 100644 --- a/src/test/ui/span/issue-43927-non-ADT-derive.stderr +++ b/src/test/ui/span/issue-43927-non-ADT-derive.stderr @@ -1,33 +1,10 @@ -error[E0774]: `derive` may only be applied to structs, enums and unions - --> $DIR/issue-43927-non-ADT-derive.rs:3:1 +error: cannot determine resolution for the attribute macro `derive` + --> $DIR/issue-43927-non-ADT-derive.rs:1:4 | LL | #![derive(Debug, PartialEq, Eq)] // should be an outer attribute! - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try an outer attribute: `#[derive(Debug, PartialEq, Eq)]` - -error: cannot determine resolution for the derive macro `Debug` - --> $DIR/issue-43927-non-ADT-derive.rs:3:11 - | -LL | #![derive(Debug, PartialEq, Eq)] // should be an outer attribute! - | ^^^^^ - | - = note: import resolution is stuck, try simplifying macro imports - -error: cannot determine resolution for the derive macro `PartialEq` - --> $DIR/issue-43927-non-ADT-derive.rs:3:18 - | -LL | #![derive(Debug, PartialEq, Eq)] // should be an outer attribute! - | ^^^^^^^^^ - | - = note: import resolution is stuck, try simplifying macro imports - -error: cannot determine resolution for the derive macro `Eq` - --> $DIR/issue-43927-non-ADT-derive.rs:3:29 - | -LL | #![derive(Debug, PartialEq, Eq)] // should be an outer attribute! - | ^^ + | ^^^^^^ | = note: import resolution is stuck, try simplifying macro imports -error: aborting due to 4 previous errors +error: aborting due to previous error -For more information about this error, try `rustc --explain E0774`. diff --git a/src/test/ui/span/macro-ty-params.rs b/src/test/ui/span/macro-ty-params.rs index 713b9eb542c..0a93105b664 100644 --- a/src/test/ui/span/macro-ty-params.rs +++ b/src/test/ui/span/macro-ty-params.rs @@ -9,5 +9,5 @@ macro_rules! foo { () => () } fn main() { foo::<T>!(); //~ ERROR generic arguments in macro path foo::<>!(); //~ ERROR generic arguments in macro path - m!(Default<>); //~ ERROR generic arguments in macro path + m!(Default<>); //~ ERROR unexpected generic arguments in path } diff --git a/src/test/ui/span/macro-ty-params.stderr b/src/test/ui/span/macro-ty-params.stderr index 21683b2fb86..138cd2598a1 100644 --- a/src/test/ui/span/macro-ty-params.stderr +++ b/src/test/ui/span/macro-ty-params.stderr @@ -10,7 +10,7 @@ error: generic arguments in macro path LL | foo::<>!(); | ^^ -error: generic arguments in macro path +error: unexpected generic arguments in path --> $DIR/macro-ty-params.rs:12:15 | LL | m!(Default<>); |
