Commit f5cd2c5
committed
Auto merge of #127117 - Urgau:non_local_def-syntactic, r=BoxyUwU
Rework `non_local_definitions` lint to only use a syntactic heuristic
This PR reworks the `non_local_definitions` lint to only use a syntactic heuristic, i.e. not use a type-system logic for whenever an `impl` is local or not.
Instead the new logic wanted by T-lang in #126768 (comment), which is to consider every paths in `Self` and `Trait` and to no longer use the type-system inference trick.
`@rustbot` labels +L-non_local_definitions
Fixes #126768File tree
31 files changed
+186
-956
lines changed- compiler/rustc_lint
- src
- tests
- rustdoc-ui/doctest
- ui/lint/non-local-defs
31 files changed
+186
-956
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
592 | 592 | | |
593 | 593 | | |
594 | 594 | | |
595 | | - | |
596 | | - | |
597 | | - | |
598 | | - | |
| 595 | + | |
599 | 596 | | |
600 | 597 | | |
601 | 598 | | |
| |||
617 | 614 | | |
618 | 615 | | |
619 | 616 | | |
620 | | - | |
621 | | - | |
622 | | - | |
623 | | - | |
624 | | - | |
625 | | - | |
626 | 617 | | |
627 | 618 | | |
628 | 619 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1375 | 1375 | | |
1376 | 1376 | | |
1377 | 1377 | | |
1378 | | - | |
1379 | 1378 | | |
1380 | | - | |
1381 | | - | |
1382 | | - | |
1383 | | - | |
1384 | 1379 | | |
1385 | 1380 | | |
1386 | 1381 | | |
| |||
1401 | 1396 | | |
1402 | 1397 | | |
1403 | 1398 | | |
1404 | | - | |
1405 | 1399 | | |
1406 | | - | |
1407 | | - | |
1408 | | - | |
1409 | | - | |
1410 | 1400 | | |
1411 | 1401 | | |
1412 | 1402 | | |
1413 | 1403 | | |
1414 | 1404 | | |
1415 | 1405 | | |
1416 | | - | |
1417 | | - | |
1418 | | - | |
1419 | | - | |
1420 | 1406 | | |
1421 | 1407 | | |
1422 | 1408 | | |
| |||
1427 | 1413 | | |
1428 | 1414 | | |
1429 | 1415 | | |
1430 | | - | |
1431 | | - | |
1432 | | - | |
1433 | | - | |
1434 | | - | |
1435 | | - | |
| 1416 | + | |
1436 | 1417 | | |
1437 | | - | |
1438 | | - | |
1439 | | - | |
1440 | | - | |
1441 | | - | |
1442 | | - | |
1443 | | - | |
1444 | 1418 | | |
1445 | 1419 | | |
1446 | 1420 | | |
1447 | 1421 | | |
1448 | | - | |
1449 | | - | |
1450 | | - | |
1451 | | - | |
1452 | | - | |
1453 | | - | |
1454 | | - | |
1455 | | - | |
1456 | | - | |
1457 | | - | |
1458 | 1422 | | |
1459 | 1423 | | |
1460 | 1424 | | |
| |||
0 commit comments