Skip to content

Commit f68672b

Browse files
committed
Fix duplicate test fallout
1 parent 133190b commit f68672b

32 files changed

+340
-67
lines changed

src/test/ui-fulldeps/lint-plugin-forbid-attrs.rs

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ fn lintme() { } //~ ERROR item is named 'lintme'
1212
//~^ ERROR allow(test_lint) overruled by outer forbid(test_lint)
1313
//~| ERROR allow(test_lint) overruled by outer forbid(test_lint)
1414
//~| ERROR allow(test_lint) overruled by outer forbid(test_lint)
15+
//~| ERROR allow(test_lint) overruled by outer forbid(test_lint)
1516
pub fn main() {
1617
lintme();
1718
}

src/test/ui-fulldeps/lint-plugin-forbid-attrs.stderr

+10-1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,15 @@ LL | #![forbid(test_lint)]
4545
LL | #[allow(test_lint)]
4646
| ^^^^^^^^^ overruled by previous forbid
4747

48-
error: aborting due to 4 previous errors
48+
error[E0453]: allow(test_lint) overruled by outer forbid(test_lint)
49+
--> $DIR/lint-plugin-forbid-attrs.rs:11:9
50+
|
51+
LL | #![forbid(test_lint)]
52+
| --------- `forbid` level set here
53+
...
54+
LL | #[allow(test_lint)]
55+
| ^^^^^^^^^ overruled by previous forbid
56+
57+
error: aborting due to 5 previous errors
4958

5059
For more information about this error, try `rustc --explain E0453`.

src/test/ui-fulldeps/lint-plugin-forbid-cmdline.rs

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ fn lintme() { } //~ ERROR item is named 'lintme'
1010
#[allow(test_lint)] //~ ERROR allow(test_lint) overruled by outer forbid(test_lint)
1111
//~| ERROR allow(test_lint) overruled by outer forbid(test_lint)
1212
//~| ERROR allow(test_lint) overruled by outer forbid(test_lint)
13+
//~| ERROR allow(test_lint) overruled by outer forbid(test_lint)
1314
pub fn main() {
1415
lintme();
1516
}

src/test/ui-fulldeps/lint-plugin-forbid-cmdline.stderr

+9-1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,14 @@ LL | #[allow(test_lint)]
3838
|
3939
= note: `forbid` lint level was set on command line
4040

41-
error: aborting due to 4 previous errors
41+
error[E0453]: allow(test_lint) overruled by outer forbid(test_lint)
42+
--> $DIR/lint-plugin-forbid-cmdline.rs:10:9
43+
|
44+
LL | #[allow(test_lint)]
45+
| ^^^^^^^^^ overruled by previous forbid
46+
|
47+
= note: `forbid` lint level was set on command line
48+
49+
error: aborting due to 5 previous errors
4250

4351
For more information about this error, try `rustc --explain E0453`.

src/test/ui-fulldeps/lint-tool-test.rs

+3
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@
1010
//~^ WARNING lint name `test_lint` is deprecated and may not have an effect in the future
1111
//~| WARNING lint name `test_lint` is deprecated and may not have an effect in the future
1212
//~| WARNING lint name `test_lint` is deprecated and may not have an effect in the future
13+
//~| WARNING lint name `test_lint` is deprecated and may not have an effect in the future
1314
#![deny(clippy_group)]
1415
//~^ WARNING lint name `clippy_group` is deprecated and may not have an effect in the future
1516
//~| WARNING lint name `clippy_group` is deprecated and may not have an effect in the future
1617
//~| WARNING lint name `clippy_group` is deprecated and may not have an effect in the future
18+
//~| WARNING lint name `clippy_group` is deprecated and may not have an effect in the future
1719

1820
fn lintme() { } //~ ERROR item is named 'lintme'
1921

@@ -30,6 +32,7 @@ pub fn main() {
3032
//~^ WARNING lint name `test_group` is deprecated and may not have an effect in the future
3133
//~| WARNING lint name `test_group` is deprecated and may not have an effect in the future
3234
//~| WARNING lint name `test_group` is deprecated and may not have an effect in the future
35+
//~| WARNING lint name `test_group` is deprecated and may not have an effect in the future
3336
#[deny(this_lint_does_not_exist)] //~ WARNING unknown lint: `this_lint_does_not_exist`
3437
fn hello() {
3538
fn lintmetoo() { }

src/test/ui-fulldeps/lint-tool-test.stderr

+29-11
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@ LL | #![cfg_attr(foo, warn(test_lint))]
77
= note: `#[warn(renamed_and_removed_lints)]` on by default
88

99
warning: lint name `clippy_group` is deprecated and may not have an effect in the future. Also `cfg_attr(cargo-clippy)` won't be necessary anymore
10-
--> $DIR/lint-tool-test.rs:13:9
10+
--> $DIR/lint-tool-test.rs:14:9
1111
|
1212
LL | #![deny(clippy_group)]
1313
| ^^^^^^^^^^^^ help: change it to: `clippy::group`
1414

1515
warning: lint name `test_group` is deprecated and may not have an effect in the future. Also `cfg_attr(cargo-clippy)` won't be necessary anymore
16-
--> $DIR/lint-tool-test.rs:29:9
16+
--> $DIR/lint-tool-test.rs:31:9
1717
|
1818
LL | #[allow(test_group)]
1919
| ^^^^^^^^^^ help: change it to: `clippy::test_group`
2020

2121
warning: unknown lint: `this_lint_does_not_exist`
22-
--> $DIR/lint-tool-test.rs:33:8
22+
--> $DIR/lint-tool-test.rs:36:8
2323
|
2424
LL | #[deny(this_lint_does_not_exist)]
2525
| ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -33,13 +33,13 @@ LL | #![cfg_attr(foo, warn(test_lint))]
3333
| ^^^^^^^^^ help: change it to: `clippy::test_lint`
3434

3535
warning: lint name `clippy_group` is deprecated and may not have an effect in the future. Also `cfg_attr(cargo-clippy)` won't be necessary anymore
36-
--> $DIR/lint-tool-test.rs:13:9
36+
--> $DIR/lint-tool-test.rs:14:9
3737
|
3838
LL | #![deny(clippy_group)]
3939
| ^^^^^^^^^^^^ help: change it to: `clippy::group`
4040

4141
warning: lint name `test_group` is deprecated and may not have an effect in the future. Also `cfg_attr(cargo-clippy)` won't be necessary anymore
42-
--> $DIR/lint-tool-test.rs:29:9
42+
--> $DIR/lint-tool-test.rs:31:9
4343
|
4444
LL | #[allow(test_group)]
4545
| ^^^^^^^^^^ help: change it to: `clippy::test_group`
@@ -59,39 +59,57 @@ LL | #![cfg_attr(foo, warn(test_lint))]
5959
| ^^^^^^^^^ help: change it to: `clippy::test_lint`
6060

6161
warning: lint name `clippy_group` is deprecated and may not have an effect in the future. Also `cfg_attr(cargo-clippy)` won't be necessary anymore
62-
--> $DIR/lint-tool-test.rs:13:9
62+
--> $DIR/lint-tool-test.rs:14:9
6363
|
6464
LL | #![deny(clippy_group)]
6565
| ^^^^^^^^^^^^ help: change it to: `clippy::group`
6666

6767
error: item is named 'lintme'
68-
--> $DIR/lint-tool-test.rs:18:1
68+
--> $DIR/lint-tool-test.rs:20:1
6969
|
7070
LL | fn lintme() { }
7171
| ^^^^^^^^^^^^^^^
7272
|
7373
note: lint level defined here
74-
--> $DIR/lint-tool-test.rs:13:9
74+
--> $DIR/lint-tool-test.rs:14:9
7575
|
7676
LL | #![deny(clippy_group)]
7777
| ^^^^^^^^^^^^
7878
= note: `#[deny(clippy::test_lint)]` implied by `#[deny(clippy::group)]`
7979

8080
error: item is named 'lintmetoo'
81-
--> $DIR/lint-tool-test.rs:26:5
81+
--> $DIR/lint-tool-test.rs:28:5
8282
|
8383
LL | fn lintmetoo() { }
8484
| ^^^^^^^^^^^^^^^^^^
8585
|
8686
note: lint level defined here
87-
--> $DIR/lint-tool-test.rs:13:9
87+
--> $DIR/lint-tool-test.rs:14:9
8888
|
8989
LL | #![deny(clippy_group)]
9090
| ^^^^^^^^^^^^
9191
= note: `#[deny(clippy::test_group)]` implied by `#[deny(clippy::group)]`
9292

9393
warning: lint name `test_group` is deprecated and may not have an effect in the future. Also `cfg_attr(cargo-clippy)` won't be necessary anymore
94-
--> $DIR/lint-tool-test.rs:29:9
94+
--> $DIR/lint-tool-test.rs:31:9
95+
|
96+
LL | #[allow(test_group)]
97+
| ^^^^^^^^^^ help: change it to: `clippy::test_group`
98+
99+
warning: lint name `test_lint` is deprecated and may not have an effect in the future. Also `cfg_attr(cargo-clippy)` won't be necessary anymore
100+
--> $DIR/lint-tool-test.rs:9:23
101+
|
102+
LL | #![cfg_attr(foo, warn(test_lint))]
103+
| ^^^^^^^^^ help: change it to: `clippy::test_lint`
104+
105+
warning: lint name `clippy_group` is deprecated and may not have an effect in the future. Also `cfg_attr(cargo-clippy)` won't be necessary anymore
106+
--> $DIR/lint-tool-test.rs:14:9
107+
|
108+
LL | #![deny(clippy_group)]
109+
| ^^^^^^^^^^^^ help: change it to: `clippy::group`
110+
111+
warning: lint name `test_group` is deprecated and may not have an effect in the future. Also `cfg_attr(cargo-clippy)` won't be necessary anymore
112+
--> $DIR/lint-tool-test.rs:31:9
95113
|
96114
LL | #[allow(test_group)]
97115
| ^^^^^^^^^^ help: change it to: `clippy::test_group`

src/test/ui/deduplicate-diagnostics.duplicate.stderr

+7-1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ error[E0452]: malformed lint attribute input
2828
LL | #[deny("literal")]
2929
| ^^^^^^^^^ bad attribute argument
3030

31-
error: aborting due to 5 previous errors
31+
error[E0452]: malformed lint attribute input
32+
--> $DIR/deduplicate-diagnostics.rs:8:8
33+
|
34+
LL | #[deny("literal")]
35+
| ^^^^^^^^^ bad attribute argument
36+
37+
error: aborting due to 6 previous errors
3238

3339
For more information about this error, try `rustc --explain E0452`.

src/test/ui/deduplicate-diagnostics.rs

+1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ struct S;
88
#[deny("literal")] //~ ERROR malformed lint attribute input
99
//[duplicate]~| ERROR malformed lint attribute input
1010
//[duplicate]~| ERROR malformed lint attribute input
11+
//[duplicate]~| ERROR malformed lint attribute input
1112
fn main() {}

src/test/ui/error-codes/E0452.rs

+2
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,7 @@
44
//~| ERROR E0452
55
//~| ERROR E0452
66
//~| ERROR E0452
7+
//~| ERROR E0452
8+
//~| ERROR E0452
79
fn main() {
810
}

src/test/ui/error-codes/E0452.stderr

+13-1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,18 @@ error[E0452]: malformed lint attribute input
3434
LL | #![allow(foo = "")]
3535
| ^^^^^^^^ bad attribute argument
3636

37-
error: aborting due to 6 previous errors
37+
error[E0452]: malformed lint attribute input
38+
--> $DIR/E0452.rs:1:10
39+
|
40+
LL | #![allow(foo = "")]
41+
| ^^^^^^^^ bad attribute argument
42+
43+
error[E0452]: malformed lint attribute input
44+
--> $DIR/E0452.rs:1:10
45+
|
46+
LL | #![allow(foo = "")]
47+
| ^^^^^^^^ bad attribute argument
48+
49+
error: aborting due to 8 previous errors
3850

3951
For more information about this error, try `rustc --explain E0452`.

src/test/ui/error-codes/E0453.rs

+1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@
44
//~^ ERROR allow(non_snake_case) overruled by outer forbid(non_snake_case)
55
//~| ERROR allow(non_snake_case) overruled by outer forbid(non_snake_case)
66
//~| ERROR allow(non_snake_case) overruled by outer forbid(non_snake_case)
7+
//~| ERROR allow(non_snake_case) overruled by outer forbid(non_snake_case)
78
fn main() {
89
}

src/test/ui/error-codes/E0453.stderr

+10-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,15 @@ LL |
2525
LL | #[allow(non_snake_case)]
2626
| ^^^^^^^^^^^^^^ overruled by previous forbid
2727

28-
error: aborting due to 3 previous errors
28+
error[E0453]: allow(non_snake_case) overruled by outer forbid(non_snake_case)
29+
--> $DIR/E0453.rs:3:9
30+
|
31+
LL | #![forbid(non_snake_case)]
32+
| -------------- `forbid` level set here
33+
LL |
34+
LL | #[allow(non_snake_case)]
35+
| ^^^^^^^^^^^^^^ overruled by previous forbid
36+
37+
error: aborting due to 4 previous errors
2938

3039
For more information about this error, try `rustc --explain E0453`.

src/test/ui/error-codes/E0602.stderr

+5-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ error[E0602]: unknown lint: `bogus`
1010
|
1111
= note: requested on the command line with `-D bogus`
1212

13-
error: aborting due to 3 previous errors
13+
error[E0602]: unknown lint: `bogus`
14+
|
15+
= note: requested on the command line with `-D bogus`
16+
17+
error: aborting due to 4 previous errors
1418

1519
For more information about this error, try `rustc --explain E0602`.

src/test/ui/feature-gates/feature-gate-lint-reasons.rs

+1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
//~^ ERROR lint reasons are experimental
33
//~| ERROR lint reasons are experimental
44
//~| ERROR lint reasons are experimental
5+
//~| ERROR lint reasons are experimental
56

67
fn main() {}

src/test/ui/feature-gates/feature-gate-lint-reasons.stderr

+10-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,15 @@ LL | #![warn(nonstandard_style, reason = "the standard should be respected")]
2525
= note: for more information, see https://github.com/rust-lang/rust/issues/54503
2626
= help: add `#![feature(lint_reasons)]` to the crate attributes to enable
2727

28-
error: aborting due to 3 previous errors
28+
error[E0658]: lint reasons are experimental
29+
--> $DIR/feature-gate-lint-reasons.rs:1:28
30+
|
31+
LL | #![warn(nonstandard_style, reason = "the standard should be respected")]
32+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
33+
|
34+
= note: for more information, see https://github.com/rust-lang/rust/issues/54503
35+
= help: add `#![feature(lint_reasons)]` to the crate attributes to enable
36+
37+
error: aborting due to 4 previous errors
2938

3039
For more information about this error, try `rustc --explain E0658`.

src/test/ui/lint/lint-forbid-attr.rs

+1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@
44
//~^ ERROR allow(deprecated) overruled by outer forbid(deprecated)
55
//~| ERROR allow(deprecated) overruled by outer forbid(deprecated)
66
//~| ERROR allow(deprecated) overruled by outer forbid(deprecated)
7+
//~| ERROR allow(deprecated) overruled by outer forbid(deprecated)
78
fn main() {
89
}

src/test/ui/lint/lint-forbid-attr.stderr

+10-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,15 @@ LL |
2525
LL | #[allow(deprecated)]
2626
| ^^^^^^^^^^ overruled by previous forbid
2727

28-
error: aborting due to 3 previous errors
28+
error[E0453]: allow(deprecated) overruled by outer forbid(deprecated)
29+
--> $DIR/lint-forbid-attr.rs:3:9
30+
|
31+
LL | #![forbid(deprecated)]
32+
| ---------- `forbid` level set here
33+
LL |
34+
LL | #[allow(deprecated)]
35+
| ^^^^^^^^^^ overruled by previous forbid
36+
37+
error: aborting due to 4 previous errors
2938

3039
For more information about this error, try `rustc --explain E0453`.

src/test/ui/lint/lint-forbid-cmdline.rs

+1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
#[allow(deprecated)] //~ ERROR allow(deprecated) overruled by outer forbid(deprecated)
44
//~| ERROR allow(deprecated) overruled by outer forbid(deprecated)
55
//~| ERROR allow(deprecated) overruled by outer forbid(deprecated)
6+
//~| ERROR allow(deprecated) overruled by outer forbid(deprecated)
67
fn main() {
78
}

src/test/ui/lint/lint-forbid-cmdline.stderr

+9-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,14 @@ LL | #[allow(deprecated)]
2222
|
2323
= note: `forbid` lint level was set on command line
2424

25-
error: aborting due to 3 previous errors
25+
error[E0453]: allow(deprecated) overruled by outer forbid(deprecated)
26+
--> $DIR/lint-forbid-cmdline.rs:3:9
27+
|
28+
LL | #[allow(deprecated)]
29+
| ^^^^^^^^^^ overruled by previous forbid
30+
|
31+
= note: `forbid` lint level was set on command line
32+
33+
error: aborting due to 4 previous errors
2634

2735
For more information about this error, try `rustc --explain E0453`.

src/test/ui/lint/lint-malformed.rs

+2
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,6 @@
55
//~| ERROR malformed lint attribute
66
//~| ERROR malformed lint attribute
77
//~| ERROR malformed lint attribute
8+
//~| ERROR malformed lint attribute
9+
//~| ERROR malformed lint attribute
810
fn main() { }

src/test/ui/lint/lint-malformed.stderr

+13-1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,18 @@ error[E0452]: malformed lint attribute input
4040
LL | #![allow(bar = "baz")]
4141
| ^^^^^^^^^^^ bad attribute argument
4242

43-
error: aborting due to 7 previous errors
43+
error[E0452]: malformed lint attribute input
44+
--> $DIR/lint-malformed.rs:2:10
45+
|
46+
LL | #![allow(bar = "baz")]
47+
| ^^^^^^^^^^^ bad attribute argument
48+
49+
error[E0452]: malformed lint attribute input
50+
--> $DIR/lint-malformed.rs:2:10
51+
|
52+
LL | #![allow(bar = "baz")]
53+
| ^^^^^^^^^^^ bad attribute argument
54+
55+
error: aborting due to 9 previous errors
4456

4557
For more information about this error, try `rustc --explain E0452`.

src/test/ui/lint/lint-unknown-lint-cmdline.stderr

+10-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,15 @@ error[E0602]: unknown lint: `dead_cod`
2525
= help: did you mean: `dead_code`
2626
= note: requested on the command line with `-D dead_cod`
2727

28-
error: aborting due to 6 previous errors
28+
error[E0602]: unknown lint: `bogus`
29+
|
30+
= note: requested on the command line with `-D bogus`
31+
32+
error[E0602]: unknown lint: `dead_cod`
33+
|
34+
= help: did you mean: `dead_code`
35+
= note: requested on the command line with `-D dead_cod`
36+
37+
error: aborting due to 8 previous errors
2938

3039
For more information about this error, try `rustc --explain E0602`.

src/test/ui/lint/outer-forbid.rs

+3
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,19 @@
99
#[allow(unused_variables)] //~ ERROR overruled
1010
//~| ERROR overruled
1111
//~| ERROR overruled
12+
//~| ERROR overruled
1213
fn foo() {}
1314

1415
#[allow(unused)] //~ ERROR overruled
1516
//~| ERROR overruled
1617
//~| ERROR overruled
18+
//~| ERROR overruled
1719
fn bar() {}
1820

1921
#[allow(nonstandard_style)] //~ ERROR overruled
2022
//~| ERROR overruled
2123
//~| ERROR overruled
24+
//~| ERROR overruled
2225
fn main() {
2326
println!("hello forbidden world")
2427
}

0 commit comments

Comments
 (0)