Commit d9ac2be
committed
Handle proc-macro spans pointing at attribute in suggestions
Hide invalid proc-macro suggestions and track spans
coming from proc-macros pointing at attribute.
Effectively, unless the proc-macro keeps user spans,
suggestions will not be produced for the code they
produce.
Account for desugaring when checking if a span can be used for suggestions
Fix #106720.1 parent 2e7034e commit d9ac2be
File tree
69 files changed
+2905
-2666
lines changed- compiler
- rustc_ast_lowering/src
- rustc_borrowck/src/diagnostics
- rustc_builtin_macros/src
- rustc_const_eval/src/transform/check_consts
- rustc_errors/src
- rustc_hir_analysis/src
- check
- structured_errors
- rustc_hir_typeck/src
- fn_ctxt
- rustc_infer/src/infer/error_reporting
- rustc_middle/src/ty
- rustc_resolve/src/late
- rustc_span/src
- rustc_trait_selection/src/traits/error_reporting
- src/tools/rustfmt/src
- tests/ui
- alloc-error
- argument-suggestions
- borrowck
- feature-gates
- fully-qualified-type
- hygiene
- issues
- macros
- match
- numeric
- numeric-suffix
- proc-macro
- type/type-check
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
69 files changed
+2905
-2666
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
286 | 286 | | |
287 | 287 | | |
288 | 288 | | |
289 | | - | |
| 289 | + | |
290 | 290 | | |
291 | 291 | | |
292 | | - | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
293 | 296 | | |
294 | 297 | | |
295 | 298 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2073 | 2073 | | |
2074 | 2074 | | |
2075 | 2075 | | |
2076 | | - | |
| 2076 | + | |
2077 | 2077 | | |
2078 | 2078 | | |
2079 | | - | |
| 2079 | + | |
2080 | 2080 | | |
2081 | | - | |
| 2081 | + | |
2082 | 2082 | | |
2083 | 2083 | | |
2084 | 2084 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
457 | 457 | | |
458 | 458 | | |
459 | 459 | | |
460 | | - | |
| 460 | + | |
461 | 461 | | |
462 | 462 | | |
463 | 463 | | |
464 | 464 | | |
465 | 465 | | |
466 | 466 | | |
467 | 467 | | |
468 | | - | |
| 468 | + | |
469 | 469 | | |
470 | 470 | | |
471 | 471 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
141 | | - | |
| 141 | + | |
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
| |||
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
259 | | - | |
| 259 | + | |
| 260 | + | |
260 | 261 | | |
261 | 262 | | |
262 | 263 | | |
263 | | - | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
264 | 268 | | |
265 | 269 | | |
266 | 270 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
621 | 621 | | |
622 | 622 | | |
623 | 623 | | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
624 | 628 | | |
625 | 629 | | |
626 | 630 | | |
| |||
711 | 715 | | |
712 | 716 | | |
713 | 717 | | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
714 | 721 | | |
715 | 722 | | |
716 | 723 | | |
| |||
774 | 781 | | |
775 | 782 | | |
776 | 783 | | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
777 | 787 | | |
778 | 788 | | |
779 | 789 | | |
| |||
799 | 809 | | |
800 | 810 | | |
801 | 811 | | |
802 | | - | |
| 812 | + | |
803 | 813 | | |
804 | 814 | | |
805 | 815 | | |
806 | 816 | | |
807 | 817 | | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
808 | 822 | | |
809 | 823 | | |
810 | 824 | | |
| |||
819 | 833 | | |
820 | 834 | | |
821 | 835 | | |
822 | | - | |
| 836 | + | |
823 | 837 | | |
824 | 838 | | |
825 | 839 | | |
| |||
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1351 | 1351 | | |
1352 | 1352 | | |
1353 | 1353 | | |
1354 | | - | |
| 1354 | + | |
1355 | 1355 | | |
1356 | 1356 | | |
1357 | 1357 | | |
| |||
1367 | 1367 | | |
1368 | 1368 | | |
1369 | 1369 | | |
1370 | | - | |
| 1370 | + | |
1371 | 1371 | | |
1372 | 1372 | | |
1373 | 1373 | | |
| |||
1464 | 1464 | | |
1465 | 1465 | | |
1466 | 1466 | | |
1467 | | - | |
| 1467 | + | |
| 1468 | + | |
1468 | 1469 | | |
1469 | 1470 | | |
1470 | 1471 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
223 | | - | |
| 223 | + | |
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
| |||
Lines changed: 8 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
610 | 610 | | |
611 | 611 | | |
612 | 612 | | |
613 | | - | |
| 613 | + | |
614 | 614 | | |
615 | 615 | | |
616 | | - | |
| 616 | + | |
617 | 617 | | |
618 | 618 | | |
619 | 619 | | |
| |||
658 | 658 | | |
659 | 659 | | |
660 | 660 | | |
661 | | - | |
| 661 | + | |
662 | 662 | | |
663 | 663 | | |
664 | 664 | | |
665 | 665 | | |
666 | | - | |
| 666 | + | |
667 | 667 | | |
668 | | - | |
| 668 | + | |
669 | 669 | | |
670 | 670 | | |
671 | 671 | | |
| |||
770 | 770 | | |
771 | 771 | | |
772 | 772 | | |
773 | | - | |
| 773 | + | |
774 | 774 | | |
775 | 775 | | |
776 | 776 | | |
| |||
953 | 953 | | |
954 | 954 | | |
955 | 955 | | |
956 | | - | |
957 | | - | |
958 | | - | |
959 | | - | |
960 | | - | |
| 956 | + | |
| 957 | + | |
961 | 958 | | |
962 | 959 | | |
963 | 960 | | |
| |||
0 commit comments