Commit e7b07ea
authored
Rollup merge of #125978 - fmease:cleanup-hir-ty-lowering-consolidate-assoc-item-access-checking, r=davidtwco
Cleanup: HIR ty lowering: Consolidate the places that do assoc item probing & access checking
Use `probe_assoc_item` (for hygienically probing an assoc item and checking if it's accessible wrt. visibility and stability) for assoc item constraints, too, not just for assoc type paths and make the privacy error translatable.File tree
6 files changed
+98
-70
lines changed- compiler/rustc_hir_analysis
- src
- hir_ty_lowering
- tests/ui
- associated-inherent-types
- traits
6 files changed
+98
-70
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
11 | 15 | | |
12 | 16 | | |
13 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
58 | 70 | | |
59 | 71 | | |
60 | 72 | | |
| |||
Lines changed: 17 additions & 33 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
294 | 294 | | |
295 | 295 | | |
296 | 296 | | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
321 | 306 | | |
322 | 307 | | |
323 | 308 | | |
| |||
404 | 389 | | |
405 | 390 | | |
406 | 391 | | |
407 | | - | |
408 | | - | |
| 392 | + | |
409 | 393 | | |
410 | | - | |
| 394 | + | |
411 | 395 | | |
412 | 396 | | |
413 | 397 | | |
| |||
426 | 410 | | |
427 | 411 | | |
428 | 412 | | |
429 | | - | |
430 | | - | |
431 | | - | |
432 | | - | |
433 | | - | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
434 | 418 | | |
435 | 419 | | |
436 | 420 | | |
437 | | - | |
| 421 | + | |
438 | 422 | | |
439 | 423 | | |
440 | 424 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1151 | 1151 | | |
1152 | 1152 | | |
1153 | 1153 | | |
1154 | | - | |
1155 | | - | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
1156 | 1158 | | |
1157 | 1159 | | |
1158 | 1160 | | |
| |||
1168 | 1170 | | |
1169 | 1171 | | |
1170 | 1172 | | |
1171 | | - | |
| 1173 | + | |
1172 | 1174 | | |
1173 | 1175 | | |
1174 | 1176 | | |
| |||
1178 | 1180 | | |
1179 | 1181 | | |
1180 | 1182 | | |
1181 | | - | |
| 1183 | + | |
1182 | 1184 | | |
1183 | 1185 | | |
1184 | 1186 | | |
| |||
1205 | 1207 | | |
1206 | 1208 | | |
1207 | 1209 | | |
1208 | | - | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
1209 | 1215 | | |
1210 | 1216 | | |
1211 | 1217 | | |
| |||
1249 | 1255 | | |
1250 | 1256 | | |
1251 | 1257 | | |
1252 | | - | |
| 1258 | + | |
1253 | 1259 | | |
1254 | 1260 | | |
1255 | 1261 | | |
| |||
1336 | 1342 | | |
1337 | 1343 | | |
1338 | 1344 | | |
1339 | | - | |
1340 | | - | |
1341 | | - | |
| 1345 | + | |
| 1346 | + | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
1342 | 1358 | | |
1343 | 1359 | | |
1344 | 1360 | | |
1345 | | - | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
1346 | 1366 | | |
1347 | | - | |
| 1367 | + | |
| 1368 | + | |
1348 | 1369 | | |
1349 | 1370 | | |
1350 | | - | |
| 1371 | + | |
1351 | 1372 | | |
1352 | | - | |
1353 | 1373 | | |
| 1374 | + | |
1354 | 1375 | | |
1355 | 1376 | | |
1356 | 1377 | | |
1357 | | - | |
1358 | | - | |
1359 | | - | |
1360 | | - | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
1361 | 1382 | | |
1362 | | - | |
| 1383 | + | |
1363 | 1384 | | |
1364 | 1385 | | |
1365 | | - | |
| 1386 | + | |
| 1387 | + | |
| 1388 | + | |
| 1389 | + | |
| 1390 | + | |
| 1391 | + | |
| 1392 | + | |
| 1393 | + | |
| 1394 | + | |
1366 | 1395 | | |
1367 | | - | |
1368 | | - | |
1369 | | - | |
1370 | | - | |
1371 | | - | |
1372 | | - | |
1373 | | - | |
1374 | | - | |
1375 | | - | |
1376 | | - | |
1377 | | - | |
1378 | | - | |
1379 | | - | |
| 1396 | + | |
| 1397 | + | |
| 1398 | + | |
| 1399 | + | |
| 1400 | + | |
| 1401 | + | |
| 1402 | + | |
| 1403 | + | |
1380 | 1404 | | |
1381 | 1405 | | |
1382 | | - | |
| 1406 | + | |
| 1407 | + | |
1383 | 1408 | | |
1384 | 1409 | | |
1385 | 1410 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
199 | | - | |
| 199 | + | |
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
203 | 203 | | |
204 | | - | |
| 204 | + | |
205 | 205 | | |
206 | 206 | | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
207 | 210 | | |
208 | 211 | | |
209 | 212 | | |
| |||
0 commit comments