You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rollup merge of #147445 - jdonszelmann:sort-targets, r=JonathanBrouwer
sort attribute targets for more consistent error messages
In this PR I noticed that we don't sort attribute targets, so a rather trivial change to the source changed the ordering in an error message even though its meaning stayed the same.
See: #147418 (comment)
I think sorting might be a good thing to do in general. I also prefer it when reading error messages. Quite a few tests changed, but not in meaning, only sorting order obviously.
r? `@jieyouxu`
Copy file name to clipboardExpand all lines: tests/ui/coverage-attr/allowed-positions.stderr
+17-17Lines changed: 17 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -14,135 +14,135 @@ error: `#[coverage]` attribute cannot be used on type aliases
14
14
LL | #[coverage(off)]
15
15
| ^^^^^^^^^^^^^^^^
16
16
|
17
-
= help: `#[coverage]` can be applied to functions, impl blocks, modules, and crates
17
+
= help: `#[coverage]` can be applied to crates, functions, impl blocks, and modules
18
18
19
19
error: `#[coverage]` attribute cannot be used on traits
20
20
--> $DIR/allowed-positions.rs:17:1
21
21
|
22
22
LL | #[coverage(off)]
23
23
| ^^^^^^^^^^^^^^^^
24
24
|
25
-
= help: `#[coverage]` can be applied to functions, impl blocks, modules, and crates
25
+
= help: `#[coverage]` can be applied to crates, functions, impl blocks, and modules
26
26
27
27
error: `#[coverage]` attribute cannot be used on associated consts
28
28
--> $DIR/allowed-positions.rs:19:5
29
29
|
30
30
LL | #[coverage(off)]
31
31
| ^^^^^^^^^^^^^^^^
32
32
|
33
-
= help: `#[coverage]` can be applied to functions, impl blocks, modules, and crates
33
+
= help: `#[coverage]` can be applied to crates, functions, impl blocks, and modules
34
34
35
35
error: `#[coverage]` attribute cannot be used on associated types
36
36
--> $DIR/allowed-positions.rs:22:5
37
37
|
38
38
LL | #[coverage(off)]
39
39
| ^^^^^^^^^^^^^^^^
40
40
|
41
-
= help: `#[coverage]` can be applied to functions, impl blocks, modules, and crates
41
+
= help: `#[coverage]` can be applied to crates, functions, impl blocks, and modules
42
42
43
43
error: `#[coverage]` attribute cannot be used on required trait methods
44
44
--> $DIR/allowed-positions.rs:25:5
45
45
|
46
46
LL | #[coverage(off)]
47
47
| ^^^^^^^^^^^^^^^^
48
48
|
49
-
= help: `#[coverage]` can be applied to impl blocks, functions, closures, provided trait methods, trait methods in impl blocks, inherent methods, modules, and crates
49
+
= help: `#[coverage]` can be applied to closures, crates, functions, impl blocks, inherent methods, modules, provided trait methods, and trait methods in impl blocks
50
50
51
51
error: `#[coverage]` attribute cannot be used on required trait methods
52
52
--> $DIR/allowed-positions.rs:31:5
53
53
|
54
54
LL | #[coverage(off)]
55
55
| ^^^^^^^^^^^^^^^^
56
56
|
57
-
= help: `#[coverage]` can be applied to impl blocks, functions, closures, provided trait methods, trait methods in impl blocks, inherent methods, modules, and crates
57
+
= help: `#[coverage]` can be applied to closures, crates, functions, impl blocks, inherent methods, modules, provided trait methods, and trait methods in impl blocks
58
58
59
59
error: `#[coverage]` attribute cannot be used on associated types
60
60
--> $DIR/allowed-positions.rs:39:5
61
61
|
62
62
LL | #[coverage(off)]
63
63
| ^^^^^^^^^^^^^^^^
64
64
|
65
-
= help: `#[coverage]` can be applied to functions, impl blocks, modules, and crates
65
+
= help: `#[coverage]` can be applied to crates, functions, impl blocks, and modules
66
66
67
67
error: `#[coverage]` attribute cannot be used on associated types
68
68
--> $DIR/allowed-positions.rs:56:5
69
69
|
70
70
LL | #[coverage(off)]
71
71
| ^^^^^^^^^^^^^^^^
72
72
|
73
-
= help: `#[coverage]` can be applied to functions, impl blocks, modules, and crates
73
+
= help: `#[coverage]` can be applied to crates, functions, impl blocks, and modules
74
74
75
75
error: `#[coverage]` attribute cannot be used on structs
76
76
--> $DIR/allowed-positions.rs:61:1
77
77
|
78
78
LL | #[coverage(off)]
79
79
| ^^^^^^^^^^^^^^^^
80
80
|
81
-
= help: `#[coverage]` can be applied to functions, impl blocks, modules, and crates
81
+
= help: `#[coverage]` can be applied to crates, functions, impl blocks, and modules
82
82
83
83
error: `#[coverage]` attribute cannot be used on struct fields
84
84
--> $DIR/allowed-positions.rs:63:5
85
85
|
86
86
LL | #[coverage(off)]
87
87
| ^^^^^^^^^^^^^^^^
88
88
|
89
-
= help: `#[coverage]` can be applied to functions, impl blocks, modules, and crates
89
+
= help: `#[coverage]` can be applied to crates, functions, impl blocks, and modules
90
90
91
91
error: `#[coverage]` attribute cannot be used on foreign statics
92
92
--> $DIR/allowed-positions.rs:76:5
93
93
|
94
94
LL | #[coverage(off)]
95
95
| ^^^^^^^^^^^^^^^^
96
96
|
97
-
= help: `#[coverage]` can be applied to functions, impl blocks, modules, and crates
97
+
= help: `#[coverage]` can be applied to crates, functions, impl blocks, and modules
98
98
99
99
error: `#[coverage]` attribute cannot be used on foreign types
100
100
--> $DIR/allowed-positions.rs:79:5
101
101
|
102
102
LL | #[coverage(off)]
103
103
| ^^^^^^^^^^^^^^^^
104
104
|
105
-
= help: `#[coverage]` can be applied to functions, impl blocks, modules, and crates
105
+
= help: `#[coverage]` can be applied to crates, functions, impl blocks, and modules
106
106
107
107
error: `#[coverage]` attribute cannot be used on foreign functions
108
108
--> $DIR/allowed-positions.rs:82:5
109
109
|
110
110
LL | #[coverage(off)]
111
111
| ^^^^^^^^^^^^^^^^
112
112
|
113
-
= help: `#[coverage]` can be applied to methods, impl blocks, functions, closures, modules, and crates
113
+
= help: `#[coverage]` can be applied to closures, crates, functions, impl blocks, methods, and modules
114
114
115
115
error: `#[coverage]` attribute cannot be used on statements
116
116
--> $DIR/allowed-positions.rs:88:5
117
117
|
118
118
LL | #[coverage(off)]
119
119
| ^^^^^^^^^^^^^^^^
120
120
|
121
-
= help: `#[coverage]` can be applied to functions, impl blocks, modules, and crates
121
+
= help: `#[coverage]` can be applied to crates, functions, impl blocks, and modules
122
122
123
123
error: `#[coverage]` attribute cannot be used on statements
124
124
--> $DIR/allowed-positions.rs:94:5
125
125
|
126
126
LL | #[coverage(off)]
127
127
| ^^^^^^^^^^^^^^^^
128
128
|
129
-
= help: `#[coverage]` can be applied to functions, impl blocks, modules, and crates
129
+
= help: `#[coverage]` can be applied to crates, functions, impl blocks, and modules
130
130
131
131
error: `#[coverage]` attribute cannot be used on match arms
132
132
--> $DIR/allowed-positions.rs:110:9
133
133
|
134
134
LL | #[coverage(off)]
135
135
| ^^^^^^^^^^^^^^^^
136
136
|
137
-
= help: `#[coverage]` can be applied to functions, impl blocks, modules, and crates
137
+
= help: `#[coverage]` can be applied to crates, functions, impl blocks, and modules
138
138
139
139
error: `#[coverage]` attribute cannot be used on expressions
140
140
--> $DIR/allowed-positions.rs:114:5
141
141
|
142
142
LL | #[coverage(off)]
143
143
| ^^^^^^^^^^^^^^^^
144
144
|
145
-
= help: `#[coverage]` can be applied to functions, impl blocks, modules, and crates
145
+
= help: `#[coverage]` can be applied to crates, functions, impl blocks, and modules
0 commit comments