Skip to content

Commit 3f48f02

Browse files
committed
Update --check-cfg tests that had old --cfg warning
1 parent 8f6f8aa commit 3f48f02

14 files changed

+90
-117
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
warning: unexpected `cfg` condition name: `unknown_key`
2-
--> $DIR/exhaustive-names-values.rs:12:7
2+
--> $DIR/exhaustive-names-values.rs:11:7
33
|
44
LL | #[cfg(unknown_key = "value")]
55
| ^^^^^^^^^^^^^^^^^^^^^
@@ -8,7 +8,7 @@ LL | #[cfg(unknown_key = "value")]
88
= note: `#[warn(unexpected_cfgs)]` on by default
99

1010
warning: unexpected `cfg` condition value: `value`
11-
--> $DIR/exhaustive-names-values.rs:16:7
11+
--> $DIR/exhaustive-names-values.rs:15:7
1212
|
1313
LL | #[cfg(test = "value")]
1414
| ^^^^----------
@@ -17,9 +17,5 @@ LL | #[cfg(test = "value")]
1717
|
1818
= note: no expected value for `test`
1919

20-
warning: unexpected `empty_cfg` as condition name
21-
|
22-
= help: was set with `--cfg` but isn't in the `--check-cfg` expected names
23-
24-
warning: 3 warnings emitted
20+
warning: 2 warnings emitted
2521

Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
warning: unexpected `cfg` condition name: `unknown_key`
2-
--> $DIR/exhaustive-names-values.rs:12:7
2+
--> $DIR/exhaustive-names-values.rs:11:7
33
|
44
LL | #[cfg(unknown_key = "value")]
55
| ^^^^^^^^^^^^^^^^^^^^^
@@ -8,7 +8,7 @@ LL | #[cfg(unknown_key = "value")]
88
= note: `#[warn(unexpected_cfgs)]` on by default
99

1010
warning: unexpected `cfg` condition value: `value`
11-
--> $DIR/exhaustive-names-values.rs:16:7
11+
--> $DIR/exhaustive-names-values.rs:15:7
1212
|
1313
LL | #[cfg(test = "value")]
1414
| ^^^^----------
@@ -17,9 +17,5 @@ LL | #[cfg(test = "value")]
1717
|
1818
= note: no expected value for `test`
1919

20-
warning: unexpected `empty_names_values` as condition name
21-
|
22-
= help: was set with `--cfg` but isn't in the `--check-cfg` expected names
23-
24-
warning: 3 warnings emitted
20+
warning: 2 warnings emitted
2521

Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
warning: unexpected `cfg` condition name: `unknown_key`
2-
--> $DIR/exhaustive-names-values.rs:12:7
2+
--> $DIR/exhaustive-names-values.rs:11:7
33
|
44
LL | #[cfg(unknown_key = "value")]
55
| ^^^^^^^^^^^^^^^^^^^^^
@@ -8,7 +8,7 @@ LL | #[cfg(unknown_key = "value")]
88
= note: `#[warn(unexpected_cfgs)]` on by default
99

1010
warning: unexpected `cfg` condition value: `value`
11-
--> $DIR/exhaustive-names-values.rs:16:7
11+
--> $DIR/exhaustive-names-values.rs:15:7
1212
|
1313
LL | #[cfg(test = "value")]
1414
| ^^^^----------
@@ -18,16 +18,12 @@ LL | #[cfg(test = "value")]
1818
= note: no expected value for `test`
1919

2020
warning: unexpected `cfg` condition value: `unk`
21-
--> $DIR/exhaustive-names-values.rs:20:7
21+
--> $DIR/exhaustive-names-values.rs:19:7
2222
|
2323
LL | #[cfg(feature = "unk")]
2424
| ^^^^^^^^^^^^^^^
2525
|
2626
= note: expected values for `feature` are: `std`
2727

28-
warning: unexpected condition value `` for condition name `feature`
29-
|
30-
= help: was set with `--cfg` but isn't in the `--check-cfg` expected values
31-
32-
warning: 4 warnings emitted
28+
warning: 3 warnings emitted
3329

Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
warning: unexpected `cfg` condition name: `unknown_key`
2-
--> $DIR/exhaustive-names-values.rs:12:7
2+
--> $DIR/exhaustive-names-values.rs:11:7
33
|
44
LL | #[cfg(unknown_key = "value")]
55
| ^^^^^^^^^^^^^^^^^^^^^
@@ -8,7 +8,7 @@ LL | #[cfg(unknown_key = "value")]
88
= note: `#[warn(unexpected_cfgs)]` on by default
99

1010
warning: unexpected `cfg` condition value: `value`
11-
--> $DIR/exhaustive-names-values.rs:16:7
11+
--> $DIR/exhaustive-names-values.rs:15:7
1212
|
1313
LL | #[cfg(test = "value")]
1414
| ^^^^----------
@@ -18,16 +18,12 @@ LL | #[cfg(test = "value")]
1818
= note: no expected value for `test`
1919

2020
warning: unexpected `cfg` condition value: `unk`
21-
--> $DIR/exhaustive-names-values.rs:20:7
21+
--> $DIR/exhaustive-names-values.rs:19:7
2222
|
2323
LL | #[cfg(feature = "unk")]
2424
| ^^^^^^^^^^^^^^^
2525
|
2626
= note: expected values for `feature` are: `std`
2727

28-
warning: unexpected `full` as condition name
29-
|
30-
= help: was set with `--cfg` but isn't in the `--check-cfg` expected names
31-
32-
warning: 4 warnings emitted
28+
warning: 3 warnings emitted
3329

tests/ui/check-cfg/exhaustive-names-values.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// Check warning for unexpected cfg in the code and in the CLI
2-
// arguments (here the revision cfg).
1+
// Check warning for unexpected cfg in the code.
32
//
43
// check-pass
54
// revisions: empty_names_values empty_cfg feature full

tests/ui/check-cfg/exhaustive-names.empty_names.stderr

+1-5
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,5 @@ LL | #[cfg(unknown_key = "value")]
77
= help: expected names are: `debug_assertions`, `doc`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `unix`, `windows`
88
= note: `#[warn(unexpected_cfgs)]` on by default
99

10-
warning: unexpected `empty_names` as condition name
11-
|
12-
= help: was set with `--cfg` but isn't in the `--check-cfg` expected names
13-
14-
warning: 2 warnings emitted
10+
warning: 1 warning emitted
1511

tests/ui/check-cfg/exhaustive-names.exhaustive_names.stderr

+1-5
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,5 @@ LL | #[cfg(unknown_key = "value")]
77
= help: expected names are: `debug_assertions`, `doc`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `unix`, `windows`
88
= note: `#[warn(unexpected_cfgs)]` on by default
99

10-
warning: unexpected `exhaustive_names` as condition name
11-
|
12-
= help: was set with `--cfg` but isn't in the `--check-cfg` expected names
13-
14-
warning: 2 warnings emitted
10+
warning: 1 warning emitted
1511

tests/ui/check-cfg/exhaustive-values.empty_cfg.stderr

+1-5
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,5 @@ LL | #[cfg(test = "value")]
99
= note: no expected value for `test`
1010
= note: `#[warn(unexpected_cfgs)]` on by default
1111

12-
warning: unexpected `empty_cfg` as condition name
13-
|
14-
= help: was set with `--cfg` but isn't in the `--check-cfg` expected names
15-
16-
warning: 2 warnings emitted
12+
warning: 1 warning emitted
1713

tests/ui/check-cfg/mix.cfg.stderr

+31-26
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
11
warning: unexpected `cfg` condition name: `widnows`
2-
--> $DIR/mix.rs:15:7
2+
--> $DIR/mix.rs:17:7
33
|
44
LL | #[cfg(widnows)]
55
| ^^^^^^^ help: there is a config with a similar name: `windows`
66
|
77
= note: `#[warn(unexpected_cfgs)]` on by default
88

99
warning: unexpected `cfg` condition value: (none)
10-
--> $DIR/mix.rs:19:7
10+
--> $DIR/mix.rs:21:7
1111
|
1212
LL | #[cfg(feature)]
1313
| ^^^^^^^- help: specify a config value: `= "foo"`
1414
|
1515
= note: expected values for `feature` are: `foo`
1616

1717
warning: unexpected `cfg` condition value: `bar`
18-
--> $DIR/mix.rs:26:7
18+
--> $DIR/mix.rs:28:7
1919
|
2020
LL | #[cfg(feature = "bar")]
2121
| ^^^^^^^^^^^^^^^
2222
|
2323
= note: expected values for `feature` are: `foo`
2424

2525
warning: unexpected `cfg` condition value: `zebra`
26-
--> $DIR/mix.rs:30:7
26+
--> $DIR/mix.rs:32:7
2727
|
2828
LL | #[cfg(feature = "zebra")]
2929
| ^^^^^^^^^^^^^^^^^
3030
|
3131
= note: expected values for `feature` are: `foo`
3232

3333
warning: unexpected `cfg` condition name: `uu`
34-
--> $DIR/mix.rs:34:12
34+
--> $DIR/mix.rs:36:12
3535
|
3636
LL | #[cfg_attr(uu, test)]
3737
| ^^
@@ -41,147 +41,152 @@ LL | #[cfg_attr(uu, test)]
4141
warning: unexpected condition value `bar` for condition name `feature`
4242
|
4343
= help: was set with `--cfg` but isn't in the `--check-cfg` expected values
44+
note: the lint level is defined here
45+
--> $DIR/mix.rs:12:9
46+
|
47+
LL | #![warn(unexpected_cli_cfgs)]
48+
| ^^^^^^^^^^^^^^^^^^^
4449

4550
warning: unexpected `unknown_name` as condition name
4651
|
4752
= help: was set with `--cfg` but isn't in the `--check-cfg` expected names
4853

4954
warning: unexpected `cfg` condition name: `widnows`
50-
--> $DIR/mix.rs:43:10
55+
--> $DIR/mix.rs:45:10
5156
|
5257
LL | cfg!(widnows);
5358
| ^^^^^^^ help: there is a config with a similar name: `windows`
5459

5560
warning: unexpected `cfg` condition value: `bar`
56-
--> $DIR/mix.rs:46:10
61+
--> $DIR/mix.rs:48:10
5762
|
5863
LL | cfg!(feature = "bar");
5964
| ^^^^^^^^^^^^^^^
6065
|
6166
= note: expected values for `feature` are: `foo`
6267

6368
warning: unexpected `cfg` condition value: `zebra`
64-
--> $DIR/mix.rs:48:10
69+
--> $DIR/mix.rs:50:10
6570
|
6671
LL | cfg!(feature = "zebra");
6772
| ^^^^^^^^^^^^^^^^^
6873
|
6974
= note: expected values for `feature` are: `foo`
7075

7176
warning: unexpected `cfg` condition name: `xxx`
72-
--> $DIR/mix.rs:50:10
77+
--> $DIR/mix.rs:52:10
7378
|
7479
LL | cfg!(xxx = "foo");
7580
| ^^^^^^^^^^^
7681

7782
warning: unexpected `cfg` condition name: `xxx`
78-
--> $DIR/mix.rs:52:10
83+
--> $DIR/mix.rs:54:10
7984
|
8085
LL | cfg!(xxx);
8186
| ^^^
8287

8388
warning: unexpected `cfg` condition name: `xxx`
84-
--> $DIR/mix.rs:54:14
89+
--> $DIR/mix.rs:56:14
8590
|
8691
LL | cfg!(any(xxx, windows));
8792
| ^^^
8893

8994
warning: unexpected `cfg` condition value: `bad`
90-
--> $DIR/mix.rs:56:14
95+
--> $DIR/mix.rs:58:14
9196
|
9297
LL | cfg!(any(feature = "bad", windows));
9398
| ^^^^^^^^^^^^^^^
9499
|
95100
= note: expected values for `feature` are: `foo`
96101

97102
warning: unexpected `cfg` condition name: `xxx`
98-
--> $DIR/mix.rs:58:23
103+
--> $DIR/mix.rs:60:23
99104
|
100105
LL | cfg!(any(windows, xxx));
101106
| ^^^
102107

103108
warning: unexpected `cfg` condition name: `xxx`
104-
--> $DIR/mix.rs:60:20
109+
--> $DIR/mix.rs:62:20
105110
|
106111
LL | cfg!(all(unix, xxx));
107112
| ^^^
108113

109114
warning: unexpected `cfg` condition name: `aa`
110-
--> $DIR/mix.rs:62:14
115+
--> $DIR/mix.rs:64:14
111116
|
112117
LL | cfg!(all(aa, bb));
113118
| ^^
114119

115120
warning: unexpected `cfg` condition name: `bb`
116-
--> $DIR/mix.rs:62:18
121+
--> $DIR/mix.rs:64:18
117122
|
118123
LL | cfg!(all(aa, bb));
119124
| ^^
120125

121126
warning: unexpected `cfg` condition name: `aa`
122-
--> $DIR/mix.rs:65:14
127+
--> $DIR/mix.rs:67:14
123128
|
124129
LL | cfg!(any(aa, bb));
125130
| ^^
126131

127132
warning: unexpected `cfg` condition name: `bb`
128-
--> $DIR/mix.rs:65:18
133+
--> $DIR/mix.rs:67:18
129134
|
130135
LL | cfg!(any(aa, bb));
131136
| ^^
132137

133138
warning: unexpected `cfg` condition value: `zebra`
134-
--> $DIR/mix.rs:68:20
139+
--> $DIR/mix.rs:70:20
135140
|
136141
LL | cfg!(any(unix, feature = "zebra"));
137142
| ^^^^^^^^^^^^^^^^^
138143
|
139144
= note: expected values for `feature` are: `foo`
140145

141146
warning: unexpected `cfg` condition name: `xxx`
142-
--> $DIR/mix.rs:70:14
147+
--> $DIR/mix.rs:72:14
143148
|
144149
LL | cfg!(any(xxx, feature = "zebra"));
145150
| ^^^
146151

147152
warning: unexpected `cfg` condition value: `zebra`
148-
--> $DIR/mix.rs:70:19
153+
--> $DIR/mix.rs:72:19
149154
|
150155
LL | cfg!(any(xxx, feature = "zebra"));
151156
| ^^^^^^^^^^^^^^^^^
152157
|
153158
= note: expected values for `feature` are: `foo`
154159

155160
warning: unexpected `cfg` condition name: `xxx`
156-
--> $DIR/mix.rs:73:14
161+
--> $DIR/mix.rs:75:14
157162
|
158163
LL | cfg!(any(xxx, unix, xxx));
159164
| ^^^
160165

161166
warning: unexpected `cfg` condition name: `xxx`
162-
--> $DIR/mix.rs:73:25
167+
--> $DIR/mix.rs:75:25
163168
|
164169
LL | cfg!(any(xxx, unix, xxx));
165170
| ^^^
166171

167172
warning: unexpected `cfg` condition value: `zebra`
168-
--> $DIR/mix.rs:76:14
173+
--> $DIR/mix.rs:78:14
169174
|
170175
LL | cfg!(all(feature = "zebra", feature = "zebra", feature = "zebra"));
171176
| ^^^^^^^^^^^^^^^^^
172177
|
173178
= note: expected values for `feature` are: `foo`
174179

175180
warning: unexpected `cfg` condition value: `zebra`
176-
--> $DIR/mix.rs:76:33
181+
--> $DIR/mix.rs:78:33
177182
|
178183
LL | cfg!(all(feature = "zebra", feature = "zebra", feature = "zebra"));
179184
| ^^^^^^^^^^^^^^^^^
180185
|
181186
= note: expected values for `feature` are: `foo`
182187

183188
warning: unexpected `cfg` condition value: `zebra`
184-
--> $DIR/mix.rs:76:52
189+
--> $DIR/mix.rs:78:52
185190
|
186191
LL | cfg!(all(feature = "zebra", feature = "zebra", feature = "zebra"));
187192
| ^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)