about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-09-06 00:14:41 +0000
committerbors <bors@rust-lang.org>2021-09-06 00:14:41 +0000
commit8f3aa5e8b9e176e8a5fff81a681eba1805366e3d (patch)
tree9aff1d58e6d28e96d4d10d8f9dbebf569f66faf9 /src/test
parent7849e3e9dda60e8ec826ee245c6b180e73911b37 (diff)
parentca27f03ca8862344567dcc1e6ec01f29442835fa (diff)
Auto merge of #88493 - chenyukang:fix-duplicated-diagnostic, r=estebank
Fix #88256 remove duplicated diagnostics

Fix #88256
Diffstat (limited to 'src/test')
-rw-r--r--src/test/ui/lint/issue-70819-dont-override-forbid-in-same-scope.rs2
-rw-r--r--src/test/ui/lint/issue-70819-dont-override-forbid-in-same-scope.stderr13
-rw-r--r--src/test/ui/lint/outer-forbid.rs3
-rw-r--r--src/test/ui/lint/outer-forbid.stderr18
4 files changed, 5 insertions, 31 deletions
diff --git a/src/test/ui/lint/issue-70819-dont-override-forbid-in-same-scope.rs b/src/test/ui/lint/issue-70819-dont-override-forbid-in-same-scope.rs
index 05d7d924c8f..c66037e9a73 100644
--- a/src/test/ui/lint/issue-70819-dont-override-forbid-in-same-scope.rs
+++ b/src/test/ui/lint/issue-70819-dont-override-forbid-in-same-scope.rs
@@ -21,8 +21,6 @@ fn forbid_first(num: i32) -> i32 {
     #![deny(unused)]
     //~^ ERROR: deny(unused) incompatible with previous forbid
     //~| WARNING being phased out
-    //~| ERROR: deny(unused) incompatible with previous forbid
-    //~| WARNING being phased out
     #![warn(unused)]
     #![allow(unused)]
 
diff --git a/src/test/ui/lint/issue-70819-dont-override-forbid-in-same-scope.stderr b/src/test/ui/lint/issue-70819-dont-override-forbid-in-same-scope.stderr
index 475410cecff..5093715decf 100644
--- a/src/test/ui/lint/issue-70819-dont-override-forbid-in-same-scope.stderr
+++ b/src/test/ui/lint/issue-70819-dont-override-forbid-in-same-scope.stderr
@@ -14,16 +14,5 @@ LL | #![forbid(forbidden_lint_groups)]
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #81670 <https://github.com/rust-lang/rust/issues/81670>
 
-error: deny(unused) incompatible with previous forbid
-  --> $DIR/issue-70819-dont-override-forbid-in-same-scope.rs:21:13
-   |
-LL |     #![forbid(unused)]
-   |               ------ `forbid` level set here
-LL |     #![deny(unused)]
-   |             ^^^^^^ overruled by previous forbid
-   |
-   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
-   = note: for more information, see issue #81670 <https://github.com/rust-lang/rust/issues/81670>
-
-error: aborting due to 2 previous errors
+error: aborting due to previous error
 
diff --git a/src/test/ui/lint/outer-forbid.rs b/src/test/ui/lint/outer-forbid.rs
index 486ec3c4680..ba330258d11 100644
--- a/src/test/ui/lint/outer-forbid.rs
+++ b/src/test/ui/lint/outer-forbid.rs
@@ -17,10 +17,9 @@
 #![forbid(unused, non_snake_case)]
 #![forbid(forbidden_lint_groups)]
 
-#[allow(unused_variables)] //~ ERROR incompatible with previous
+#[allow(unused_variables)]
 //~^ ERROR incompatible with previous
 //~| WARNING this was previously accepted by the compiler
-//~| WARNING this was previously accepted by the compiler
 fn foo() {}
 
 #[allow(unused)] //~ ERROR incompatible with previous
diff --git a/src/test/ui/lint/outer-forbid.stderr b/src/test/ui/lint/outer-forbid.stderr
index d69157a8bb3..78145732105 100644
--- a/src/test/ui/lint/outer-forbid.stderr
+++ b/src/test/ui/lint/outer-forbid.stderr
@@ -16,7 +16,7 @@ LL | #![forbid(forbidden_lint_groups)]
    = note: for more information, see issue #81670 <https://github.com/rust-lang/rust/issues/81670>
 
 error: allow(unused) incompatible with previous forbid
-  --> $DIR/outer-forbid.rs:26:9
+  --> $DIR/outer-forbid.rs:25:9
    |
 LL | #![forbid(unused, non_snake_case)]
    |           ------ `forbid` level set here
@@ -28,7 +28,7 @@ LL | #[allow(unused)]
    = note: for more information, see issue #81670 <https://github.com/rust-lang/rust/issues/81670>
 
 error[E0453]: allow(nonstandard_style) incompatible with previous forbid
-  --> $DIR/outer-forbid.rs:30:9
+  --> $DIR/outer-forbid.rs:29:9
    |
 LL | #![forbid(unused, non_snake_case)]
    |                   -------------- `forbid` level set here
@@ -36,18 +36,6 @@ LL | #![forbid(unused, non_snake_case)]
 LL | #[allow(nonstandard_style)]
    |         ^^^^^^^^^^^^^^^^^ overruled by previous forbid
 
-error: allow(unused_variables) incompatible with previous forbid
-  --> $DIR/outer-forbid.rs:20:9
-   |
-LL | #![forbid(unused, non_snake_case)]
-   |           ------ `forbid` level set here
-...
-LL | #[allow(unused_variables)]
-   |         ^^^^^^^^^^^^^^^^ overruled by previous forbid
-   |
-   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
-   = note: for more information, see issue #81670 <https://github.com/rust-lang/rust/issues/81670>
-
-error: aborting due to 4 previous errors
+error: aborting due to 3 previous errors
 
 For more information about this error, try `rustc --explain E0453`.