summary refs log tree commit diff
path: root/src/test/ui/malformed
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2020-11-19 01:54:19 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2020-11-19 19:25:20 +0300
commitcd2177f3de22f54d7e71eea1e270f4e424394fc7 (patch)
treefc14fa30678990db7f8974853af94ae72717c188 /src/test/ui/malformed
parentec547202b4fa11cd351b29d076391d2913364fc6 (diff)
downloadrust-cd2177f3de22f54d7e71eea1e270f4e424394fc7.tar.gz
rust-cd2177f3de22f54d7e71eea1e270f4e424394fc7.zip
expand: Stop derive expansion un unexpected targets early
Collect derive placeholders using `collect` instead of `push`
Diffstat (limited to 'src/test/ui/malformed')
-rw-r--r--src/test/ui/malformed/issue-69341-malformed-derive-inert.rs1
-rw-r--r--src/test/ui/malformed/issue-69341-malformed-derive-inert.stderr10
2 files changed, 2 insertions, 9 deletions
diff --git a/src/test/ui/malformed/issue-69341-malformed-derive-inert.rs b/src/test/ui/malformed/issue-69341-malformed-derive-inert.rs
index 24692f7cf52..1fd7cddc7c9 100644
--- a/src/test/ui/malformed/issue-69341-malformed-derive-inert.rs
+++ b/src/test/ui/malformed/issue-69341-malformed-derive-inert.rs
@@ -4,7 +4,6 @@ struct CLI {
     #[derive(parse())]
     //~^ ERROR traits in `#[derive(...)]` don't accept arguments
     //~| ERROR cannot find derive macro `parse` in this scope
-    //~| ERROR cannot find derive macro `parse` in this scope
     path: (),
     //~^ ERROR `derive` may only be applied to structs, enums and unions
 }
diff --git a/src/test/ui/malformed/issue-69341-malformed-derive-inert.stderr b/src/test/ui/malformed/issue-69341-malformed-derive-inert.stderr
index c4532a375a7..db40ce07530 100644
--- a/src/test/ui/malformed/issue-69341-malformed-derive-inert.stderr
+++ b/src/test/ui/malformed/issue-69341-malformed-derive-inert.stderr
@@ -5,7 +5,7 @@ LL |     #[derive(parse())]
    |                   ^^ help: remove the arguments
 
 error[E0774]: `derive` may only be applied to structs, enums and unions
-  --> $DIR/issue-69341-malformed-derive-inert.rs:8:5
+  --> $DIR/issue-69341-malformed-derive-inert.rs:7:5
    |
 LL |     path: (),
    |     ^^^^^^^^
@@ -16,12 +16,6 @@ error: cannot find derive macro `parse` in this scope
 LL |     #[derive(parse())]
    |              ^^^^^
 
-error: cannot find derive macro `parse` in this scope
-  --> $DIR/issue-69341-malformed-derive-inert.rs:4:14
-   |
-LL |     #[derive(parse())]
-   |              ^^^^^
-
-error: aborting due to 4 previous errors
+error: aborting due to 3 previous errors
 
 For more information about this error, try `rustc --explain E0774`.