Commit ff48fc9
authored
Rollup merge of rust-lang#71618 - ecstatic-morse:issue-71394, r=nikomatsakis
Preserve substitutions when making trait obligations for suggestions
Resolves rust-lang#71394.
I *think* `map_bound_ref` is correct here. In any case, I think a lot of the diagnostic code is using `skip_binder` more aggressively than it should be, so I doubt that this is worse than the status quo. The assertion that `new_self_ty` has no escaping bound vars should be enough.
r? @estebank
cc @nikomatsakis Is the call to `skip_binder` on line 551 (and elsewhere in this file) appropriate? https://github.com/rust-lang/rust/blob/46ec74e60f238f694b46c976d6217e7cf8d4cf1a/src/librustc_trait_selection/traits/error_reporting/suggestions.rs#L537-L565File tree
5 files changed
+69
-43
lines changed- src
- librustc_trait_selection/traits/error_reporting
- test/ui/suggestions
5 files changed
+69
-43
lines changedLines changed: 22 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1000 | 1000 | | |
1001 | 1001 | | |
1002 | 1002 | | |
1003 | | - | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
1004 | 1008 | | |
1005 | | - | |
1006 | | - | |
1007 | | - | |
1008 | 1009 | | |
| 1010 | + | |
| 1011 | + | |
1009 | 1012 | | |
1010 | 1013 | | |
1011 | 1014 | | |
| |||
1380 | 1383 | | |
1381 | 1384 | | |
1382 | 1385 | | |
1383 | | - | |
| 1386 | + | |
1384 | 1387 | | |
1385 | | - | |
1386 | | - | |
1387 | | - | |
1388 | 1388 | | |
| 1389 | + | |
| 1390 | + | |
1389 | 1391 | | |
1390 | | - | |
1391 | | - | |
1392 | | - | |
| 1392 | + | |
| 1393 | + | |
| 1394 | + | |
| 1395 | + | |
| 1396 | + | |
| 1397 | + | |
| 1398 | + | |
| 1399 | + | |
| 1400 | + | |
| 1401 | + | |
| 1402 | + | |
| 1403 | + | |
1393 | 1404 | | |
1394 | 1405 | | |
1395 | 1406 | | |
| |||
Lines changed: 31 additions & 31 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
532 | 532 | | |
533 | 533 | | |
534 | 534 | | |
535 | | - | |
536 | | - | |
537 | | - | |
538 | | - | |
539 | | - | |
540 | | - | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
541 | 544 | | |
542 | | - | |
| 545 | + | |
543 | 546 | | |
544 | 547 | | |
545 | 548 | | |
| |||
694 | 697 | | |
695 | 698 | | |
696 | 699 | | |
697 | | - | |
698 | 700 | | |
699 | 701 | | |
700 | 702 | | |
| |||
705 | 707 | | |
706 | 708 | | |
707 | 709 | | |
708 | | - | |
| 710 | + | |
709 | 711 | | |
710 | 712 | | |
711 | | - | |
712 | | - | |
| 713 | + | |
| 714 | + | |
713 | 715 | | |
714 | | - | |
715 | | - | |
716 | | - | |
717 | | - | |
| 716 | + | |
718 | 717 | | |
| 718 | + | |
| 719 | + | |
719 | 720 | | |
720 | 721 | | |
721 | 722 | | |
| |||
782 | 783 | | |
783 | 784 | | |
784 | 785 | | |
785 | | - | |
| 786 | + | |
786 | 787 | | |
787 | 788 | | |
788 | 789 | | |
789 | 790 | | |
790 | | - | |
791 | | - | |
792 | | - | |
793 | | - | |
| 791 | + | |
794 | 792 | | |
| 793 | + | |
| 794 | + | |
795 | 795 | | |
796 | | - | |
797 | | - | |
798 | | - | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
799 | 800 | | |
800 | 801 | | |
801 | 802 | | |
| |||
812 | 813 | | |
813 | 814 | | |
814 | 815 | | |
815 | | - | |
| 816 | + | |
816 | 817 | | |
817 | 818 | | |
818 | 819 | | |
| |||
1891 | 1892 | | |
1892 | 1893 | | |
1893 | 1894 | | |
1894 | | - | |
| 1895 | + | |
1895 | 1896 | | |
1896 | 1897 | | |
1897 | 1898 | | |
| |||
1946 | 1947 | | |
1947 | 1948 | | |
1948 | 1949 | | |
1949 | | - | |
| 1950 | + | |
1950 | 1951 | | |
1951 | 1952 | | |
1952 | | - | |
1953 | | - | |
1954 | | - | |
1955 | | - | |
| 1953 | + | |
1956 | 1954 | | |
| 1955 | + | |
| 1956 | + | |
1957 | 1957 | | |
1958 | | - | |
| 1958 | + | |
1959 | 1959 | | |
1960 | 1960 | | |
1961 | 1961 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | 11 | | |
13 | 12 | | |
14 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
0 commit comments