Commit da169f3
committed
feat: Stabilize
This allows users to either
- hide warnings (#14258)
- error on warnings (#8424)
`build.warnings` is setup to mirror the behavior of `RUSTFLAGS=-Dwarnings`,
including
- only errors for lint warnings and not hard warnings
- only errors for local warnings and not non-local warnings visible with
`--verbose --verbose`
- stop the build without `--keep-going`
These conditions were not originally met and also came as feedback from
rust-lang/rust which has been dogfooding this since the merge of rust-lang/rust#148332.
Things are a bit different with `RUSTFLAGS=-Awarnings`:
- Hard warnings are hidden for rustc but not cargo (rustc seems in the
wrong imo)
- In particular, we shouldn't mask the edition warning for Cargo
Script
- both hide the warning summary line (number of warnings per crate)
- both hide non-local warnings for `--verbose --verbose`
One design constraint we are operating on with this is that changing
`build.warnings` should not cause a rebuild, unlike a `RUSTFLAGS`
solution.
Closes #14802build.warnings
1 parent 418aed5 commit da169f3
6 files changed
Lines changed: 29 additions & 84 deletions
File tree
- src
- cargo
- core
- util/context
- doc/src/reference
- tests/testsuite
- cargo/z_help
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
914 | 914 | | |
915 | 915 | | |
916 | 916 | | |
917 | | - | |
918 | 917 | | |
919 | 918 | | |
920 | 919 | | |
| |||
1001 | 1000 | | |
1002 | 1001 | | |
1003 | 1002 | | |
| 1003 | + | |
| 1004 | + | |
1004 | 1005 | | |
1005 | 1006 | | |
1006 | 1007 | | |
| |||
1389 | 1390 | | |
1390 | 1391 | | |
1391 | 1392 | | |
| 1393 | + | |
1392 | 1394 | | |
1393 | 1395 | | |
1394 | 1396 | | |
| |||
1456 | 1458 | | |
1457 | 1459 | | |
1458 | 1460 | | |
1459 | | - | |
1460 | 1461 | | |
1461 | 1462 | | |
1462 | 1463 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2114 | 2114 | | |
2115 | 2115 | | |
2116 | 2116 | | |
2117 | | - | |
2118 | | - | |
2119 | | - | |
2120 | | - | |
2121 | | - | |
| 2117 | + | |
2122 | 2118 | | |
2123 | 2119 | | |
2124 | 2120 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
| |||
457 | 458 | | |
458 | 459 | | |
459 | 460 | | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
460 | 475 | | |
461 | 476 | | |
462 | 477 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
135 | | - | |
136 | 135 | | |
137 | 136 | | |
138 | 137 | | |
| |||
1839 | 1838 | | |
1840 | 1839 | | |
1841 | 1840 | | |
1842 | | - | |
1843 | | - | |
1844 | | - | |
1845 | | - | |
1846 | | - | |
1847 | | - | |
1848 | | - | |
1849 | | - | |
1850 | | - | |
1851 | | - | |
1852 | | - | |
1853 | | - | |
1854 | | - | |
1855 | | - | |
1856 | | - | |
1857 | | - | |
1858 | | - | |
1859 | | - | |
1860 | | - | |
1861 | | - | |
1862 | | - | |
1863 | | - | |
1864 | 1841 | | |
1865 | 1842 | | |
1866 | 1843 | | |
| |||
2348 | 2325 | | |
2349 | 2326 | | |
2350 | 2327 | | |
| 2328 | + | |
| 2329 | + | |
| 2330 | + | |
| 2331 | + | |
Loading
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | 25 | | |
44 | 26 | | |
45 | 27 | | |
| |||
56 | 38 | | |
57 | 39 | | |
58 | 40 | | |
59 | | - | |
60 | | - | |
61 | 41 | | |
62 | 42 | | |
63 | 43 | | |
| |||
77 | 57 | | |
78 | 58 | | |
79 | 59 | | |
80 | | - | |
81 | | - | |
82 | 60 | | |
83 | 61 | | |
84 | 62 | | |
| |||
93 | 71 | | |
94 | 72 | | |
95 | 73 | | |
96 | | - | |
97 | | - | |
98 | 74 | | |
99 | 75 | | |
100 | 76 | | |
| |||
112 | 88 | | |
113 | 89 | | |
114 | 90 | | |
115 | | - | |
116 | | - | |
117 | 91 | | |
118 | 92 | | |
119 | 93 | | |
| |||
146 | 120 | | |
147 | 121 | | |
148 | 122 | | |
149 | | - | |
150 | | - | |
151 | 123 | | |
152 | 124 | | |
153 | 125 | | |
| |||
164 | 136 | | |
165 | 137 | | |
166 | 138 | | |
167 | | - | |
168 | | - | |
169 | 139 | | |
170 | 140 | | |
171 | 141 | | |
| |||
189 | 159 | | |
190 | 160 | | |
191 | 161 | | |
192 | | - | |
193 | | - | |
194 | 162 | | |
195 | 163 | | |
196 | 164 | | |
| |||
201 | 169 | | |
202 | 170 | | |
203 | 171 | | |
204 | | - | |
205 | | - | |
206 | 172 | | |
207 | 173 | | |
208 | 174 | | |
| |||
220 | 186 | | |
221 | 187 | | |
222 | 188 | | |
223 | | - | |
224 | | - | |
225 | 189 | | |
226 | 190 | | |
227 | 191 | | |
| |||
236 | 200 | | |
237 | 201 | | |
238 | 202 | | |
239 | | - | |
240 | | - | |
241 | 203 | | |
242 | 204 | | |
243 | 205 | | |
| |||
300 | 262 | | |
301 | 263 | | |
302 | 264 | | |
303 | | - | |
304 | | - | |
305 | 265 | | |
306 | 266 | | |
307 | 267 | | |
| |||
370 | 330 | | |
371 | 331 | | |
372 | 332 | | |
373 | | - | |
374 | | - | |
375 | 333 | | |
376 | 334 | | |
377 | 335 | | |
| |||
446 | 404 | | |
447 | 405 | | |
448 | 406 | | |
449 | | - | |
450 | | - | |
451 | 407 | | |
452 | 408 | | |
453 | 409 | | |
| |||
520 | 476 | | |
521 | 477 | | |
522 | 478 | | |
523 | | - | |
524 | | - | |
525 | 479 | | |
526 | 480 | | |
527 | 481 | | |
| |||
0 commit comments