Commit 2a676f2
authored
Auto merge of #142030 - oli-obk:wfck-less-hir, r=<try>
Start moving wf checking away from HIR
I'm trying to only access the HIR in the error path. My hope is that once we move significant portions of wfcheck off HIR that incremental will be able to cache wfcheck queries significantly better.
I think I am reaching a blocker because we normally need to provide good spans to `ObligationCause`, so that the trait solver can report good errors. In some cases I have been able to use bad spans and improve them depending on the `ObligationCauseCode` (by loading HIR in the case where we actually want to error). To scale that further we'll likely need to remove spans from the `ObligationCause` entirely (leaving it to some variants of `ObligationCauseCode` to have a span when they can't recompute the information later). Unsure this is the right approach, but we've already been using it. I will create an MCP about it, but that should not affect this PR, which is fairly limited in where it does those kind of tricks.
Especially b862d88 is interesting here, because I think it improves spans in all casesFile tree
88 files changed
+943
-770
lines changed- compiler
- rustc_hir_analysis/src/check
- rustc_hir/src
- rustc_trait_selection/src/error_reporting/traits
- tests
- incremental
- ui
- associated-consts
- associated-types
- async-await/async-fn
- coherence
- fuzzing
- const-generics
- generic_const_exprs
- delegation
- did_you_mean
- dropck
- enum-discriminant
- error-codes
- feature-gates
- fn
- generic-associated-types
- impl-trait/in-trait
- infinite
- issues
- layout
- lazy-type-alias
- lifetimes
- methods
- regions
- simd
- specialization
- defaultimpl
- min_specialization
- stability-attribute
- statics
- traits
- associated_type_bound
- next-solver
- typeck
- union
- unsized
- variance
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
88 files changed
+943
-770
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4828 | 4828 | | |
4829 | 4829 | | |
4830 | 4830 | | |
| 4831 | + | |
| 4832 | + | |
| 4833 | + | |
| 4834 | + | |
4831 | 4835 | | |
4832 | 4836 | | |
4833 | 4837 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
37 | 40 | | |
38 | 41 | | |
39 | 42 | | |
| |||
701 | 704 | | |
702 | 705 | | |
703 | 706 | | |
704 | | - | |
| 707 | + | |
| 708 | + | |
705 | 709 | | |
706 | 710 | | |
707 | 711 | | |
708 | 712 | | |
| 713 | + | |
709 | 714 | | |
710 | 715 | | |
711 | 716 | | |
712 | 717 | | |
| 718 | + | |
713 | 719 | | |
714 | 720 | | |
715 | 721 | | |
| |||
723 | 729 | | |
724 | 730 | | |
725 | 731 | | |
726 | | - | |
727 | | - | |
728 | | - | |
729 | | - | |
730 | | - | |
731 | | - | |
732 | | - | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
733 | 736 | | |
734 | 737 | | |
735 | 738 | | |
| |||
753 | 756 | | |
754 | 757 | | |
755 | 758 | | |
| 759 | + | |
756 | 760 | | |
757 | 761 | | |
758 | 762 | | |
| 763 | + | |
759 | 764 | | |
760 | 765 | | |
761 | 766 | | |
| |||
773 | 778 | | |
774 | 779 | | |
775 | 780 | | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
776 | 796 | | |
777 | 797 | | |
778 | | - | |
779 | | - | |
780 | | - | |
781 | | - | |
782 | | - | |
| 798 | + | |
| 799 | + | |
783 | 800 | | |
784 | 801 | | |
785 | 802 | | |
| |||
819 | 836 | | |
820 | 837 | | |
821 | 838 | | |
822 | | - | |
823 | | - | |
824 | | - | |
825 | | - | |
826 | 839 | | |
827 | 840 | | |
828 | 841 | | |
829 | 842 | | |
830 | 843 | | |
831 | 844 | | |
| 845 | + | |
832 | 846 | | |
833 | 847 | | |
834 | 848 | | |
| |||
0 commit comments