Skip to content

Commit 499e1d1

Browse files
committed
Attributes cleanup in tests
- Remove `allow` attributes for lints covered by the `unused` group in UI tests - Replace `allow` with `expect` for lints that fire, remove those that don't - Reorder attribute names inside allow or expect inner attributes
1 parent 423f965 commit 499e1d1

1,633 files changed

Lines changed: 7580 additions & 9317 deletions

File tree

Some content is hidden

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

tests/ui-toml/arbitrary_source_item_ordering/ordering_good.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
//@[bad_conf_6] error-in-other-file:
1919
//@compile-flags: --test
2020

21-
#![allow(dead_code)]
2221
#![warn(clippy::arbitrary_source_item_ordering)]
2322

2423
/// This module gets linted before clippy gives up.

tests/ui-toml/arbitrary_source_item_ordering/ordering_good_var_1.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
//@[var_1] rustc-env:CLIPPY_CONF_DIR=tests/ui-toml/arbitrary_source_item_ordering/var_1
44
//@check-pass
55

6-
#![allow(dead_code)]
76
#![warn(clippy::arbitrary_source_item_ordering)]
87

98
/// This module gets linted before clippy gives up.

tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.default.stderr

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,181 +1,181 @@
11
error: incorrect ordering of items (module item groupings specify another order)
2-
--> tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.rs:26:14
2+
--> tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.rs:25:14
33
|
44
LL | use std::rc::Weak;
55
| ^^^^
66
|
77
note: should be placed before `SNAKE_CASE`
8-
--> tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.rs:23:7
8+
--> tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.rs:22:7
99
|
1010
LL | const SNAKE_CASE: &str = "zzzzzzzz";
1111
| ^^^^^^^^^^
1212
= note: `-D clippy::arbitrary-source-item-ordering` implied by `-D warnings`
1313
= help: to override `-D warnings` add `#[allow(clippy::arbitrary_source_item_ordering)]`
1414

1515
error: incorrect ordering of items (module item groupings specify another order)
16-
--> tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.rs:165:7
16+
--> tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.rs:164:7
1717
|
1818
LL | const ZIS_SHOULD_BE_REALLY_EARLY: () = ();
1919
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
2020
|
2121
note: should be placed before `TraitUnorderedItemKinds`
22-
--> tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.rs:152:7
22+
--> tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.rs:151:7
2323
|
2424
LL | trait TraitUnorderedItemKinds {
2525
| ^^^^^^^^^^^^^^^^^^^^^^^
2626

2727
error: incorrect ordering of items (module item groupings specify another order)
28-
--> tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.rs:204:5
28+
--> tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.rs:203:5
2929
|
3030
LL | mod this_is_in_the_wrong_position {
3131
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3232
|
3333
note: should be placed before `main`
34-
--> tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.rs:199:4
34+
--> tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.rs:198:4
3535
|
3636
LL | fn main() {
3737
| ^^^^
3838

3939
error: incorrect ordering of items (module item groupings specify another order)
40-
--> tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.rs:214:7
40+
--> tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.rs:213:7
4141
|
4242
LL | const ZIS_SHOULD_BE_EVEN_EARLIER: () = ();
4343
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
4444
|
4545
note: should be placed before `ZisShouldBeBeforeZeMainFn`
46-
--> tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.rs:212:8
46+
--> tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.rs:211:8
4747
|
4848
LL | struct ZisShouldBeBeforeZeMainFn;
4949
| ^^^^^^^^^^^^^^^^^^^^^^^^^
5050

5151
error: incorrect ordering of items (must be alphabetically ordered)
52-
--> tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.rs:44:5
52+
--> tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.rs:43:5
5353
|
5454
LL | B,
5555
| ^
5656
|
5757
note: should be placed before `C`
58-
--> tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.rs:43:5
58+
--> tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.rs:42:5
5959
|
6060
LL | C,
6161
| ^
6262

6363
error: incorrect ordering of items (must be alphabetically ordered)
64-
--> tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.rs:57:5
64+
--> tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.rs:56:5
6565
|
6666
LL | g: u8,
6767
| ^
6868
|
6969
note: should be placed before `r`
70-
--> tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.rs:56:5
70+
--> tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.rs:55:5
7171
|
7272
LL | r: u8,
7373
| ^
7474

7575
error: incorrect ordering of items (must be alphabetically ordered)
76-
--> tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.rs:59:5
76+
--> tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.rs:58:5
7777
|
7878
LL | b: u8,
7979
| ^
8080
|
8181
note: should be placed before `g`
82-
--> tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.rs:57:5
82+
--> tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.rs:56:5
8383
|
8484
LL | g: u8,
8585
| ^
8686

8787
error: incorrect ordering of items (must be alphabetically ordered)
88-
--> tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.rs:112:5
88+
--> tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.rs:111:5
8989
|
9090
LL | b: bool,
9191
| ^
9292
|
9393
note: should be placed before `c`
94-
--> tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.rs:111:5
94+
--> tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.rs:110:5
9595
|
9696
LL | c: bool,
9797
| ^
9898

9999
error: incorrect ordering of items (must be alphabetically ordered)
100-
--> tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.rs:121:5
100+
--> tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.rs:120:5
101101
|
102102
LL | b: bool,
103103
| ^
104104
|
105105
note: should be placed before `c`
106-
--> tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.rs:120:5
106+
--> tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.rs:119:5
107107
|
108108
LL | c: bool,
109109
| ^
110110

111111
error: incorrect ordering of items (must be alphabetically ordered)
112-
--> tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.rs:141:11
112+
--> tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.rs:140:11
113113
|
114114
LL | const B: bool;
115115
| ^
116116
|
117117
note: should be placed before `C`
118-
--> tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.rs:140:11
118+
--> tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.rs:139:11
119119
|
120120
LL | const C: bool;
121121
| ^
122122

123123
error: incorrect ordering of items (must be alphabetically ordered)
124-
--> tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.rs:148:8
124+
--> tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.rs:147:8
125125
|
126126
LL | fn b();
127127
| ^
128128
|
129129
note: should be placed before `c`
130-
--> tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.rs:147:8
130+
--> tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.rs:146:8
131131
|
132132
LL | fn c();
133133
| ^
134134

135135
error: incorrect ordering of trait items (defined order: [Const, Type, Fn])
136-
--> tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.rs:155:5
136+
--> tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.rs:154:5
137137
|
138138
LL | const A: bool;
139139
| ^^^^^^^^^^^^^
140140
|
141141
note: should be placed before `SomeType`
142-
--> tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.rs:153:5
142+
--> tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.rs:152:5
143143
|
144144
LL | type SomeType;
145145
| ^^^^^^^^^^^^^
146146

147147
error: incorrect ordering of items (must be alphabetically ordered)
148-
--> tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.rs:171:11
148+
--> tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.rs:170:11
149149
|
150150
LL | const B: bool = false;
151151
| ^
152152
|
153153
note: should be placed before `C`
154-
--> tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.rs:170:11
154+
--> tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.rs:169:11
155155
|
156156
LL | const C: bool = false;
157157
| ^
158158

159159
error: incorrect ordering of items (must be alphabetically ordered)
160-
--> tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.rs:178:8
160+
--> tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.rs:177:8
161161
|
162162
LL | fn b() {}
163163
| ^
164164
|
165165
note: should be placed before `c`
166-
--> tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.rs:177:8
166+
--> tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.rs:176:8
167167
|
168168
LL | fn c() {}
169169
| ^
170170

171171
error: incorrect ordering of impl items (defined order: [Const, Type, Fn])
172-
--> tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.rs:189:5
172+
--> tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.rs:188:5
173173
|
174174
LL | const A: bool = false;
175175
| ^^^^^^^^^^^^^
176176
|
177177
note: should be placed before `SomeType`
178-
--> tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.rs:187:5
178+
--> tests/ui-toml/arbitrary_source_item_ordering/ordering_mixed.rs:186:5
179179
|
180180
LL | type SomeType = ();
181181
| ^^^^^^^^^^^^^

0 commit comments

Comments
 (0)