Skip to content

Commit 7bcc2cd

Browse files
committed
update test stderr
1 parent 435299b commit 7bcc2cd

File tree

205 files changed

+5203
-4909
lines changed

Some content is hidden

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

205 files changed

+5203
-4909
lines changed

ci/base-tests.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ cd clippy_dev && cargo test && cd ..
2828
./util/dev update_lints --check
2929
cargo +nightly fmt --all -- --check
3030

31+
32+
#avoid loop spam
33+
set +ex
3134
# make sure tests are formatted
3235

3336
# some lints are sensitive to formatting, exclude some files
@@ -36,7 +39,9 @@ for file in `find tests -not -path "tests/ui/methods.rs" -not -path "tests/ui/fo
3639
rustfmt ${file} --check || echo "${file} needs reformatting!" ; needs_formatting=true
3740
done
3841

39-
if $needs_reformatting
40-
"Tests need reformatting!"
42+
if [ "${needs_reformatting}" = true] ; then
43+
echo "Tests need reformatting!"
4144
exit 2
4245
fi
46+
47+
set -ex

tests/ui-toml/toml_blacklist/conf_french_blacklisted_name.stderr

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,45 @@
11
error: use of a blacklisted/placeholder name `toto`
2-
--> $DIR/conf_french_blacklisted_name.rs:19:9
2+
--> $DIR/conf_french_blacklisted_name.rs:15:9
33
|
4-
19 | fn test(toto: ()) {}
4+
15 | fn test(toto: ()) {}
55
| ^^^^
66
|
77
= note: `-D clippy::blacklisted-name` implied by `-D warnings`
88

99
error: use of a blacklisted/placeholder name `toto`
10-
--> $DIR/conf_french_blacklisted_name.rs:22:9
10+
--> $DIR/conf_french_blacklisted_name.rs:18:9
1111
|
12-
22 | let toto = 42;
12+
18 | let toto = 42;
1313
| ^^^^
1414

1515
error: use of a blacklisted/placeholder name `tata`
16-
--> $DIR/conf_french_blacklisted_name.rs:23:9
16+
--> $DIR/conf_french_blacklisted_name.rs:19:9
1717
|
18-
23 | let tata = 42;
18+
19 | let tata = 42;
1919
| ^^^^
2020

2121
error: use of a blacklisted/placeholder name `titi`
22-
--> $DIR/conf_french_blacklisted_name.rs:24:9
22+
--> $DIR/conf_french_blacklisted_name.rs:20:9
2323
|
24-
24 | let titi = 42;
24+
20 | let titi = 42;
2525
| ^^^^
2626

2727
error: use of a blacklisted/placeholder name `toto`
28-
--> $DIR/conf_french_blacklisted_name.rs:30:10
28+
--> $DIR/conf_french_blacklisted_name.rs:26:10
2929
|
30-
30 | (toto, Some(tata), titi @ Some(_)) => (),
30+
26 | (toto, Some(tata), titi @ Some(_)) => (),
3131
| ^^^^
3232

3333
error: use of a blacklisted/placeholder name `tata`
34-
--> $DIR/conf_french_blacklisted_name.rs:30:21
34+
--> $DIR/conf_french_blacklisted_name.rs:26:21
3535
|
36-
30 | (toto, Some(tata), titi @ Some(_)) => (),
36+
26 | (toto, Some(tata), titi @ Some(_)) => (),
3737
| ^^^^
3838

3939
error: use of a blacklisted/placeholder name `titi`
40-
--> $DIR/conf_french_blacklisted_name.rs:30:28
40+
--> $DIR/conf_french_blacklisted_name.rs:26:28
4141
|
42-
30 | (toto, Some(tata), titi @ Some(_)) => (),
42+
26 | (toto, Some(tata), titi @ Some(_)) => (),
4343
| ^^^^
4444

4545
error: aborting due to 7 previous errors

tests/ui-toml/toml_trivially_copy/test.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
error: this argument is passed by reference, but would be more efficient if passed by value
2-
--> $DIR/test.rs:23:11
2+
--> $DIR/test.rs:20:11
33
|
4-
23 | fn bad(x: &u16, y: &Foo) {
4+
20 | fn bad(x: &u16, y: &Foo) {}
55
| ^^^^ help: consider passing by value instead: `u16`
66
|
77
= note: `-D clippy::trivially-copy-pass-by-ref` implied by `-D warnings`
88

99
error: this argument is passed by reference, but would be more efficient if passed by value
10-
--> $DIR/test.rs:23:20
10+
--> $DIR/test.rs:20:20
1111
|
12-
23 | fn bad(x: &u16, y: &Foo) {
12+
20 | fn bad(x: &u16, y: &Foo) {}
1313
| ^^^^ help: consider passing by value instead: `Foo`
1414

1515
error: aborting due to 2 previous errors

tests/ui/absurd-extreme-comparisons.stderr

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,144 +1,144 @@
11
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
2-
--> $DIR/absurd-extreme-comparisons.rs:17:5
2+
--> $DIR/absurd-extreme-comparisons.rs:23:5
33
|
4-
17 | u <= 0;
4+
23 | u <= 0;
55
| ^^^^^^
66
|
77
= note: `-D clippy::absurd-extreme-comparisons` implied by `-D warnings`
88
= help: because 0 is the minimum value for this type, the case where the two sides are not equal never occurs, consider using u == 0 instead
99

1010
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
11-
--> $DIR/absurd-extreme-comparisons.rs:18:5
11+
--> $DIR/absurd-extreme-comparisons.rs:24:5
1212
|
13-
18 | u <= Z;
13+
24 | u <= Z;
1414
| ^^^^^^
1515
|
1616
= help: because Z is the minimum value for this type, the case where the two sides are not equal never occurs, consider using u == Z instead
1717

1818
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
19-
--> $DIR/absurd-extreme-comparisons.rs:19:5
19+
--> $DIR/absurd-extreme-comparisons.rs:25:5
2020
|
21-
19 | u < Z;
21+
25 | u < Z;
2222
| ^^^^^
2323
|
2424
= help: because Z is the minimum value for this type, this comparison is always false
2525

2626
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
27-
--> $DIR/absurd-extreme-comparisons.rs:20:5
27+
--> $DIR/absurd-extreme-comparisons.rs:26:5
2828
|
29-
20 | Z >= u;
29+
26 | Z >= u;
3030
| ^^^^^^
3131
|
3232
= help: because Z is the minimum value for this type, the case where the two sides are not equal never occurs, consider using Z == u instead
3333

3434
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
35-
--> $DIR/absurd-extreme-comparisons.rs:21:5
35+
--> $DIR/absurd-extreme-comparisons.rs:27:5
3636
|
37-
21 | Z > u;
37+
27 | Z > u;
3838
| ^^^^^
3939
|
4040
= help: because Z is the minimum value for this type, this comparison is always false
4141

4242
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
43-
--> $DIR/absurd-extreme-comparisons.rs:22:5
43+
--> $DIR/absurd-extreme-comparisons.rs:28:5
4444
|
45-
22 | u > std::u32::MAX;
45+
28 | u > std::u32::MAX;
4646
| ^^^^^^^^^^^^^^^^^
4747
|
4848
= help: because std::u32::MAX is the maximum value for this type, this comparison is always false
4949

5050
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
51-
--> $DIR/absurd-extreme-comparisons.rs:23:5
51+
--> $DIR/absurd-extreme-comparisons.rs:29:5
5252
|
53-
23 | u >= std::u32::MAX;
53+
29 | u >= std::u32::MAX;
5454
| ^^^^^^^^^^^^^^^^^^
5555
|
5656
= help: because std::u32::MAX is the maximum value for this type, the case where the two sides are not equal never occurs, consider using u == std::u32::MAX instead
5757

5858
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
59-
--> $DIR/absurd-extreme-comparisons.rs:24:5
59+
--> $DIR/absurd-extreme-comparisons.rs:30:5
6060
|
61-
24 | std::u32::MAX < u;
61+
30 | std::u32::MAX < u;
6262
| ^^^^^^^^^^^^^^^^^
6363
|
6464
= help: because std::u32::MAX is the maximum value for this type, this comparison is always false
6565

6666
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
67-
--> $DIR/absurd-extreme-comparisons.rs:25:5
67+
--> $DIR/absurd-extreme-comparisons.rs:31:5
6868
|
69-
25 | std::u32::MAX <= u;
69+
31 | std::u32::MAX <= u;
7070
| ^^^^^^^^^^^^^^^^^^
7171
|
7272
= help: because std::u32::MAX is the maximum value for this type, the case where the two sides are not equal never occurs, consider using std::u32::MAX == u instead
7373

7474
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
75-
--> $DIR/absurd-extreme-comparisons.rs:26:5
75+
--> $DIR/absurd-extreme-comparisons.rs:32:5
7676
|
77-
26 | 1-1 > u;
77+
32 | 1-1 > u;
7878
| ^^^^^^^
7979
|
8080
= help: because 1-1 is the minimum value for this type, this comparison is always false
8181

8282
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
83-
--> $DIR/absurd-extreme-comparisons.rs:27:5
83+
--> $DIR/absurd-extreme-comparisons.rs:33:5
8484
|
85-
27 | u >= !0;
85+
33 | u >= !0;
8686
| ^^^^^^^
8787
|
8888
= help: because !0 is the maximum value for this type, the case where the two sides are not equal never occurs, consider using u == !0 instead
8989

9090
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
91-
--> $DIR/absurd-extreme-comparisons.rs:28:5
91+
--> $DIR/absurd-extreme-comparisons.rs:34:5
9292
|
93-
28 | u <= 12 - 2*6;
93+
34 | u <= 12 - 2*6;
9494
| ^^^^^^^^^^^^^
9595
|
9696
= help: because 12 - 2*6 is the minimum value for this type, the case where the two sides are not equal never occurs, consider using u == 12 - 2*6 instead
9797

9898
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
99-
--> $DIR/absurd-extreme-comparisons.rs:30:5
99+
--> $DIR/absurd-extreme-comparisons.rs:36:5
100100
|
101-
30 | i < -127 - 1;
101+
36 | i < -127 - 1;
102102
| ^^^^^^^^^^^^
103103
|
104104
= help: because -127 - 1 is the minimum value for this type, this comparison is always false
105105

106106
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
107-
--> $DIR/absurd-extreme-comparisons.rs:31:5
107+
--> $DIR/absurd-extreme-comparisons.rs:37:5
108108
|
109-
31 | std::i8::MAX >= i;
109+
37 | std::i8::MAX >= i;
110110
| ^^^^^^^^^^^^^^^^^
111111
|
112112
= help: because std::i8::MAX is the maximum value for this type, this comparison is always true
113113

114114
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
115-
--> $DIR/absurd-extreme-comparisons.rs:32:5
115+
--> $DIR/absurd-extreme-comparisons.rs:38:5
116116
|
117-
32 | 3-7 < std::i32::MIN;
117+
38 | 3-7 < std::i32::MIN;
118118
| ^^^^^^^^^^^^^^^^^^^
119119
|
120120
= help: because std::i32::MIN is the minimum value for this type, this comparison is always false
121121

122122
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
123-
--> $DIR/absurd-extreme-comparisons.rs:34:5
123+
--> $DIR/absurd-extreme-comparisons.rs:40:5
124124
|
125-
34 | b >= true;
125+
40 | b >= true;
126126
| ^^^^^^^^^
127127
|
128128
= help: because true is the maximum value for this type, the case where the two sides are not equal never occurs, consider using b == true instead
129129

130130
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
131-
--> $DIR/absurd-extreme-comparisons.rs:35:5
131+
--> $DIR/absurd-extreme-comparisons.rs:41:5
132132
|
133-
35 | false > b;
133+
41 | false > b;
134134
| ^^^^^^^^^
135135
|
136136
= help: because false is the minimum value for this type, this comparison is always false
137137

138138
error: <-comparison of unit values detected. This will always be false
139-
--> $DIR/absurd-extreme-comparisons.rs:38:5
139+
--> $DIR/absurd-extreme-comparisons.rs:44:5
140140
|
141-
38 | () < {};
141+
44 | () < {};
142142
| ^^^^^^^
143143
|
144144
= note: #[deny(clippy::unit_cmp)] on by default

0 commit comments

Comments
 (0)