Skip to content

Commit

Permalink
Add a test
Browse files Browse the repository at this point in the history
  • Loading branch information
petrochenkov committed Jan 3, 2020
1 parent 1370bbc commit 6bd6a20
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/test/ui/deduplicate-diagnostics.deduplicate.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
error: cannot find derive macro `Unresolved` in this scope
--> $DIR/deduplicate-diagnostics.rs:4:10
|
LL | #[derive(Unresolved)]
| ^^^^^^^^^^

error: aborting due to previous error

14 changes: 14 additions & 0 deletions src/test/ui/deduplicate-diagnostics.duplicate.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
error: cannot find derive macro `Unresolved` in this scope
--> $DIR/deduplicate-diagnostics.rs:4:10
|
LL | #[derive(Unresolved)]
| ^^^^^^^^^^

error: cannot find derive macro `Unresolved` in this scope
--> $DIR/deduplicate-diagnostics.rs:4:10
|
LL | #[derive(Unresolved)]
| ^^^^^^^^^^

error: aborting due to 2 previous errors

8 changes: 8 additions & 0 deletions src/test/ui/deduplicate-diagnostics.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// revisions: duplicate deduplicate
//[duplicate] compile-flags: -Z deduplicate-diagnostics=no

#[derive(Unresolved)] //~ ERROR cannot find derive macro `Unresolved` in this scope
//[duplicate]~| ERROR cannot find derive macro `Unresolved` in this scope
struct S;

fn main() {}

0 comments on commit 6bd6a20

Please sign in to comment.