Commit 2a0ce4a
committed
Auto merge of #29960 - aturon:dismantle-traitref-subtyping, r=nikomatsakis
Trait references are always invariant, so all uses of subtyping between
them are equivalent to using equality.
Moreover, the overlap check was previously performed twice per impl
pair, once in each direction. It is now performed only once, and
internally uses the equality check.
On glium, a crate that spends some time in coherence, this change sped
up coherence checking by a few percent (not very significant).
r? @nikomatsakisFile tree
4 files changed
+38
-27
lines changed- src/librustc/middle
- infer
- traits
4 files changed
+38
-27
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
474 | 474 | | |
475 | 475 | | |
476 | 476 | | |
477 | | - | |
| 477 | + | |
478 | 478 | | |
479 | 479 | | |
480 | | - | |
481 | | - | |
| 480 | + | |
| 481 | + | |
482 | 482 | | |
483 | 483 | | |
484 | | - | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
485 | 497 | | |
486 | 498 | | |
487 | 499 | | |
| |||
857 | 869 | | |
858 | 870 | | |
859 | 871 | | |
860 | | - | |
| 872 | + | |
861 | 873 | | |
862 | 874 | | |
863 | 875 | | |
864 | 876 | | |
865 | 877 | | |
866 | 878 | | |
867 | | - | |
| 879 | + | |
868 | 880 | | |
869 | 881 | | |
870 | 882 | | |
871 | 883 | | |
872 | 884 | | |
873 | 885 | | |
874 | 886 | | |
875 | | - | |
| 887 | + | |
876 | 888 | | |
877 | 889 | | |
878 | 890 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
49 | | - | |
| 48 | + | |
50 | 49 | | |
51 | 50 | | |
52 | 51 | | |
| |||
68 | 67 | | |
69 | 68 | | |
70 | 69 | | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
77 | 76 | | |
78 | 77 | | |
79 | 78 | | |
80 | | - | |
| 79 | + | |
81 | 80 | | |
82 | 81 | | |
83 | 82 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
902 | 902 | | |
903 | 903 | | |
904 | 904 | | |
905 | | - | |
906 | | - | |
907 | | - | |
908 | | - | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
909 | 909 | | |
910 | 910 | | |
911 | 911 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2695 | 2695 | | |
2696 | 2696 | | |
2697 | 2697 | | |
2698 | | - | |
2699 | | - | |
2700 | | - | |
2701 | | - | |
2702 | | - | |
| 2698 | + | |
| 2699 | + | |
| 2700 | + | |
| 2701 | + | |
| 2702 | + | |
2703 | 2703 | | |
2704 | 2704 | | |
2705 | 2705 | | |
| |||
0 commit comments