This repository was archived by the owner on May 28, 2025. It is now read-only.
Commit c749254
committed
Auto merge of rust-lang#95149 - cjgillot:once-diag, r=estebank
Remove `Session::one_time_diagnostic`
This is untracked mutable state, which modified the behaviour of queries.
It was used for 2 things: some full-blown errors, but mostly for lint declaration notes ("the lint level is defined here" notes).
It is replaced by the diagnostic deduplication infra which already exists in the diagnostic emitter.
A new diagnostic level `OnceNote` is introduced specifically for lint notes, to deduplicate subdiagnostics.
As a drive-by, diagnostic emission takes a `&mut` to allow dropping the `SubDiagnostic`s.File tree
46 files changed
+227
-359
lines changed- compiler
- rustc_borrowck/src
- rustc_codegen_ssa/src/back
- rustc_const_eval/src/transform/check_consts
- rustc_driver/src
- rustc_errors/src
- rustc_expand/src
- rustc_middle/src
- middle
- rustc_mir_transform/src
- rustc_parse/src
- rustc_query_system/src/dep_graph
- rustc_session/src
- rustc_trait_selection/src
- traits/error_reporting
- rustc_typeck/src/check
- src
- test
- rustdoc-ui
- ui-fulldeps
- ui
- autoref-autoderef
- closures/2229_closure_analysis/diagnostics
- did_you_mean
- infinite
- issues
- lint
- unused
- liveness
- never_type
- proc-macro
- group-compat-hack
- tools
- clippy/src
- rustfmt/src/parse
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
46 files changed
+227
-359
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2361 | 2361 | | |
2362 | 2362 | | |
2363 | 2363 | | |
2364 | | - | |
2365 | | - | |
| 2364 | + | |
| 2365 | + | |
2366 | 2366 | | |
2367 | 2367 | | |
2368 | 2368 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1748 | 1748 | | |
1749 | 1749 | | |
1750 | 1750 | | |
1751 | | - | |
| 1751 | + | |
1752 | 1752 | | |
1753 | 1753 | | |
1754 | 1754 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
258 | | - | |
259 | | - | |
| 258 | + | |
| 259 | + | |
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1181 | 1181 | | |
1182 | 1182 | | |
1183 | 1183 | | |
1184 | | - | |
1185 | | - | |
| 1184 | + | |
| 1185 | + | |
1186 | 1186 | | |
1187 | 1187 | | |
1188 | 1188 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | | - | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
139 | 144 | | |
140 | 145 | | |
141 | 146 | | |
| |||
333 | 338 | | |
334 | 339 | | |
335 | 340 | | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
336 | 348 | | |
337 | 349 | | |
338 | 350 | | |
339 | 351 | | |
340 | 352 | | |
341 | 353 | | |
342 | 354 | | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
343 | 362 | | |
344 | 363 | | |
345 | 364 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
| 131 | + | |
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| |||
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
193 | | - | |
| 193 | + | |
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
| |||
396 | 396 | | |
397 | 397 | | |
398 | 398 | | |
| 399 | + | |
399 | 400 | | |
400 | 401 | | |
401 | 402 | | |
402 | 403 | | |
403 | 404 | | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
404 | 410 | | |
405 | 411 | | |
406 | 412 | | |
| |||
500 | 506 | | |
501 | 507 | | |
502 | 508 | | |
503 | | - | |
| 509 | + | |
504 | 510 | | |
505 | 511 | | |
506 | 512 | | |
507 | | - | |
| 513 | + | |
508 | 514 | | |
509 | 515 | | |
510 | 516 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
542 | 542 | | |
543 | 543 | | |
544 | 544 | | |
545 | | - | |
| 545 | + | |
546 | 546 | | |
547 | 547 | | |
548 | 548 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
919 | 920 | | |
920 | 921 | | |
921 | 922 | | |
922 | | - | |
| 923 | + | |
923 | 924 | | |
924 | 925 | | |
925 | 926 | | |
| |||
993 | 994 | | |
994 | 995 | | |
995 | 996 | | |
996 | | - | |
997 | | - | |
| 997 | + | |
| 998 | + | |
998 | 999 | | |
999 | 1000 | | |
1000 | 1001 | | |
1001 | 1002 | | |
1002 | 1003 | | |
1003 | 1004 | | |
1004 | | - | |
| 1005 | + | |
1005 | 1006 | | |
1006 | 1007 | | |
1007 | 1008 | | |
1008 | | - | |
1009 | | - | |
| 1009 | + | |
| 1010 | + | |
1010 | 1011 | | |
1011 | 1012 | | |
1012 | 1013 | | |
1013 | 1014 | | |
1014 | | - | |
| 1015 | + | |
1015 | 1016 | | |
1016 | 1017 | | |
1017 | 1018 | | |
| |||
1070 | 1071 | | |
1071 | 1072 | | |
1072 | 1073 | | |
1073 | | - | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
1074 | 1091 | | |
1075 | 1092 | | |
1076 | 1093 | | |
| |||
1221 | 1238 | | |
1222 | 1239 | | |
1223 | 1240 | | |
1224 | | - | |
| 1241 | + | |
1225 | 1242 | | |
1226 | 1243 | | |
1227 | 1244 | | |
1228 | 1245 | | |
1229 | 1246 | | |
1230 | | - | |
| 1247 | + | |
1231 | 1248 | | |
1232 | | - | |
| 1249 | + | |
1233 | 1250 | | |
1234 | 1251 | | |
1235 | 1252 | | |
1236 | 1253 | | |
1237 | 1254 | | |
1238 | 1255 | | |
1239 | | - | |
| 1256 | + | |
1240 | 1257 | | |
1241 | 1258 | | |
1242 | 1259 | | |
| |||
1253 | 1270 | | |
1254 | 1271 | | |
1255 | 1272 | | |
1256 | | - | |
| 1273 | + | |
1257 | 1274 | | |
1258 | 1275 | | |
1259 | 1276 | | |
1260 | | - | |
| 1277 | + | |
1261 | 1278 | | |
1262 | 1279 | | |
1263 | 1280 | | |
| |||
1267 | 1284 | | |
1268 | 1285 | | |
1269 | 1286 | | |
1270 | | - | |
| 1287 | + | |
1271 | 1288 | | |
1272 | 1289 | | |
1273 | 1290 | | |
| |||
1283 | 1300 | | |
1284 | 1301 | | |
1285 | 1302 | | |
1286 | | - | |
| 1303 | + | |
1287 | 1304 | | |
1288 | 1305 | | |
1289 | 1306 | | |
| |||
1350 | 1367 | | |
1351 | 1368 | | |
1352 | 1369 | | |
| 1370 | + | |
| 1371 | + | |
1353 | 1372 | | |
1354 | 1373 | | |
1355 | 1374 | | |
| |||
1372 | 1391 | | |
1373 | 1392 | | |
1374 | 1393 | | |
1375 | | - | |
| 1394 | + | |
1376 | 1395 | | |
1377 | 1396 | | |
1378 | 1397 | | |
| |||
1389 | 1408 | | |
1390 | 1409 | | |
1391 | 1410 | | |
1392 | | - | |
| 1411 | + | |
1393 | 1412 | | |
1394 | 1413 | | |
1395 | 1414 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
771 | 771 | | |
772 | 772 | | |
773 | 773 | | |
774 | | - | |
775 | | - | |
| 774 | + | |
| 775 | + | |
776 | 776 | | |
777 | 777 | | |
778 | 778 | | |
| |||
0 commit comments