Skip to content

Commit 642669c

Browse files
committed
Update tests
1 parent 41318e9 commit 642669c

File tree

204 files changed

+2841
-355
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

204 files changed

+2841
-355
lines changed

src/test/compile-fail/consts/const-fn-error.rs

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const fn f(x: usize) -> usize {
66
let mut sum = 0;
77
for i in 0..x {
88
//~^ ERROR E0015
9+
//~| ERROR E0015
910
//~| ERROR E0658
1011
//~| ERROR E0080
1112
//~| ERROR E0744

src/test/compile-fail/issue-52443.rs

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ fn main() {
88
//~| WARN denote infinite loops with
99
[(); { for _ in 0usize.. {}; 0}];
1010
//~^ ERROR calls in constants are limited to constant functions
11+
//~| ERROR calls in constants are limited to constant functions
1112
//~| ERROR `for` is not allowed in a `const`
1213
//~| ERROR references in constants may only refer to immutable values
1314
//~| ERROR evaluation of constant value failed

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

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ fn lintme() { } //~ ERROR item is named 'lintme'
1010

1111
#[allow(test_lint)]
1212
//~^ ERROR allow(test_lint) overruled by outer forbid(test_lint)
13+
//~| ERROR allow(test_lint) overruled by outer forbid(test_lint)
14+
//~| ERROR allow(test_lint) overruled by outer forbid(test_lint)
1315
pub fn main() {
1416
lintme();
1517
}

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

+19-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@ LL | #![forbid(test_lint)]
77
LL | #[allow(test_lint)]
88
| ^^^^^^^^^ overruled by previous forbid
99

10+
error[E0453]: allow(test_lint) overruled by outer forbid(test_lint)
11+
--> $DIR/lint-plugin-forbid-attrs.rs:11:9
12+
|
13+
LL | #![forbid(test_lint)]
14+
| --------- `forbid` level set here
15+
...
16+
LL | #[allow(test_lint)]
17+
| ^^^^^^^^^ overruled by previous forbid
18+
1019
warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675
1120
--> $DIR/lint-plugin-forbid-attrs.rs:5:1
1221
|
@@ -27,6 +36,15 @@ note: lint level defined here
2736
LL | #![forbid(test_lint)]
2837
| ^^^^^^^^^
2938

30-
error: aborting due to 2 previous errors
39+
error[E0453]: allow(test_lint) overruled by outer forbid(test_lint)
40+
--> $DIR/lint-plugin-forbid-attrs.rs:11:9
41+
|
42+
LL | #![forbid(test_lint)]
43+
| --------- `forbid` level set here
44+
...
45+
LL | #[allow(test_lint)]
46+
| ^^^^^^^^^ overruled by previous forbid
47+
48+
error: aborting due to 4 previous errors
3149

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

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

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
fn lintme() { } //~ ERROR item is named 'lintme'
99

1010
#[allow(test_lint)] //~ ERROR allow(test_lint) overruled by outer forbid(test_lint)
11+
//~| ERROR allow(test_lint) overruled by outer forbid(test_lint)
12+
//~| ERROR allow(test_lint) overruled by outer forbid(test_lint)
1113
pub fn main() {
1214
lintme();
1315
}

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

+17-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ LL | #[allow(test_lint)]
66
|
77
= note: `forbid` lint level was set on command line
88

9+
error[E0453]: allow(test_lint) overruled by outer forbid(test_lint)
10+
--> $DIR/lint-plugin-forbid-cmdline.rs:10:9
11+
|
12+
LL | #[allow(test_lint)]
13+
| ^^^^^^^^^ overruled by previous forbid
14+
|
15+
= note: `forbid` lint level was set on command line
16+
917
warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675
1018
--> $DIR/lint-plugin-forbid-cmdline.rs:6:1
1119
|
@@ -22,6 +30,14 @@ LL | fn lintme() { }
2230
|
2331
= note: requested on the command line with `-F test-lint`
2432

25-
error: aborting due to 2 previous errors
33+
error[E0453]: allow(test_lint) overruled by outer forbid(test_lint)
34+
--> $DIR/lint-plugin-forbid-cmdline.rs:10:9
35+
|
36+
LL | #[allow(test_lint)]
37+
| ^^^^^^^^^ overruled by previous forbid
38+
|
39+
= note: `forbid` lint level was set on command line
40+
41+
error: aborting due to 4 previous errors
2642

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

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

+12
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ warning: lint name `test_lint` is deprecated and does not have an effect anymore
22
|
33
= note: requested on the command line with `-A test_lint`
44

5+
warning: lint name `test_lint` is deprecated and does not have an effect anymore. Use: clippy::test_lint
6+
|
7+
= note: requested on the command line with `-A test_lint`
8+
59
warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675
610
--> $DIR/lint-tool-cmdline-allow.rs:7:1
711
|
@@ -10,6 +14,10 @@ LL | #![plugin(lint_tool_test)]
1014
|
1115
= note: `#[warn(deprecated)]` on by default
1216

17+
warning: lint name `test_lint` is deprecated and does not have an effect anymore. Use: clippy::test_lint
18+
|
19+
= note: requested on the command line with `-A test_lint`
20+
1321
warning: item is named 'lintme'
1422
--> $DIR/lint-tool-cmdline-allow.rs:9:1
1523
|
@@ -18,3 +26,7 @@ LL | fn lintme() {}
1826
|
1927
= note: `#[warn(clippy::test_lint)]` on by default
2028

29+
warning: lint name `test_lint` is deprecated and does not have an effect anymore. Use: clippy::test_lint
30+
|
31+
= note: requested on the command line with `-A test_lint`
32+

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

+6-1
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,12 @@
88
#![allow(dead_code)]
99
#![cfg_attr(foo, warn(test_lint))]
1010
//~^ WARNING lint name `test_lint` is deprecated and may not have an effect in the future
11-
//~^^ WARNING lint name `test_lint` is deprecated and may not have an effect in the future
11+
//~| WARNING lint name `test_lint` is deprecated and may not have an effect in the future
12+
//~| WARNING lint name `test_lint` is deprecated and may not have an effect in the future
1213
#![deny(clippy_group)]
1314
//~^ WARNING lint name `clippy_group` is deprecated and may not have an effect in the future
15+
//~| WARNING lint name `clippy_group` is deprecated and may not have an effect in the future
16+
//~| WARNING lint name `clippy_group` is deprecated and may not have an effect in the future
1417

1518
fn lintme() { } //~ ERROR item is named 'lintme'
1619

@@ -25,6 +28,8 @@ pub fn main() {
2528

2629
#[allow(test_group)]
2730
//~^ WARNING lint name `test_group` is deprecated and may not have an effect in the future
31+
//~| WARNING lint name `test_group` is deprecated and may not have an effect in the future
32+
//~| WARNING lint name `test_group` is deprecated and may not have an effect in the future
2833
#[deny(this_lint_does_not_exist)] //~ WARNING unknown lint: `this_lint_does_not_exist`
2934
fn hello() {
3035
fn lintmetoo() { }

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

+37-7
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:12:9
10+
--> $DIR/lint-tool-test.rs:13: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:26:9
16+
--> $DIR/lint-tool-test.rs:29: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:28:8
22+
--> $DIR/lint-tool-test.rs:33:8
2323
|
2424
LL | #[deny(this_lint_does_not_exist)]
2525
| ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -32,6 +32,18 @@ warning: lint name `test_lint` is deprecated and may not have an effect in the f
3232
LL | #![cfg_attr(foo, warn(test_lint))]
3333
| ^^^^^^^^^ help: change it to: `clippy::test_lint`
3434

35+
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
37+
|
38+
LL | #![deny(clippy_group)]
39+
| ^^^^^^^^^^^^ help: change it to: `clippy::group`
40+
41+
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
43+
|
44+
LL | #[allow(test_group)]
45+
| ^^^^^^^^^^ help: change it to: `clippy::test_group`
46+
3547
warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675
3648
--> $DIR/lint-tool-test.rs:6:1
3749
|
@@ -40,31 +52,49 @@ LL | #![plugin(lint_tool_test)]
4052
|
4153
= note: `#[warn(deprecated)]` on by default
4254

55+
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
56+
--> $DIR/lint-tool-test.rs:9:23
57+
|
58+
LL | #![cfg_attr(foo, warn(test_lint))]
59+
| ^^^^^^^^^ help: change it to: `clippy::test_lint`
60+
61+
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
63+
|
64+
LL | #![deny(clippy_group)]
65+
| ^^^^^^^^^^^^ help: change it to: `clippy::group`
66+
4367
error: item is named 'lintme'
44-
--> $DIR/lint-tool-test.rs:15:1
68+
--> $DIR/lint-tool-test.rs:18:1
4569
|
4670
LL | fn lintme() { }
4771
| ^^^^^^^^^^^^^^^
4872
|
4973
note: lint level defined here
50-
--> $DIR/lint-tool-test.rs:12:9
74+
--> $DIR/lint-tool-test.rs:13:9
5175
|
5276
LL | #![deny(clippy_group)]
5377
| ^^^^^^^^^^^^
5478
= note: `#[deny(clippy::test_lint)]` implied by `#[deny(clippy::group)]`
5579

5680
error: item is named 'lintmetoo'
57-
--> $DIR/lint-tool-test.rs:23:5
81+
--> $DIR/lint-tool-test.rs:26:5
5882
|
5983
LL | fn lintmetoo() { }
6084
| ^^^^^^^^^^^^^^^^^^
6185
|
6286
note: lint level defined here
63-
--> $DIR/lint-tool-test.rs:12:9
87+
--> $DIR/lint-tool-test.rs:13:9
6488
|
6589
LL | #![deny(clippy_group)]
6690
| ^^^^^^^^^^^^
6791
= note: `#[deny(clippy::test_group)]` implied by `#[deny(clippy::group)]`
6892

93+
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
95+
|
96+
LL | #[allow(test_group)]
97+
| ^^^^^^^^^^ help: change it to: `clippy::test_group`
98+
6999
error: aborting due to 2 previous errors
70100

src/test/ui/associated-type-bounds/duplicate.rs

+3
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,13 @@ trait TRW3<T> where T: Iterator<Item: 'static, Item: 'static> {}
157157
//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719]
158158
trait TRSW1 where Self: Iterator<Item: Copy, Item: Send> {}
159159
//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719]
160+
//~| ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719]
160161
trait TRSW2 where Self: Iterator<Item: Copy, Item: Copy> {}
161162
//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719]
163+
//~| ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719]
162164
trait TRSW3 where Self: Iterator<Item: 'static, Item: 'static> {}
163165
//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719]
166+
//~| ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719]
164167
trait TRA1 { type A: Iterator<Item: Copy, Item: Send>; }
165168
//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719]
166169
trait TRA2 { type A: Iterator<Item: Copy, Item: Copy>; }

0 commit comments

Comments
 (0)