Commit 1548e0f
committed
Inline
There are several reasons I changed this:
- `evaluate_obligation` is only used in one place in
`rustc_trait_selection`, and in fact warns you against using it
anywhere else.
- The implementation in `rustc_traits` was considerably more complicated
than necessary, because it didn't have the context available in
`rustc_trait_selection`.
- It allows moving OverflowError into rustc_trait_selection, making
#81091 simpler (in particular,
it allows holding an `Obligation` in OverflowError, which is only
defined in `rustc_infer` and not available in rustc_middle).
The only reason to keep the previous behavior is if the cache from the
query system made it significantly faster.evaluate_obligation instead of going through the query system1 parent 1f0fc02 commit 1548e0f
File tree
5 files changed
+8
-56
lines changed- compiler
- rustc_middle/src
- query
- ty/query
- rustc_trait_selection/src/traits/query
- rustc_traits/src
5 files changed
+8
-56
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
1531 | 1531 | | |
1532 | 1532 | | |
1533 | 1533 | | |
1534 | | - | |
1535 | | - | |
1536 | | - | |
1537 | | - | |
1538 | | - | |
1539 | | - | |
1540 | | - | |
1541 | | - | |
1542 | 1534 | | |
1543 | 1535 | | |
1544 | 1536 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
23 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
Lines changed: 2 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
3 | 2 | | |
4 | 3 | | |
| |||
63 | 62 | | |
64 | 63 | | |
65 | 64 | | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
| 65 | + | |
| 66 | + | |
73 | 67 | | |
74 | 68 | | |
75 | 69 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
| |||
24 | 23 | | |
25 | 24 | | |
26 | 25 | | |
27 | | - | |
28 | 26 | | |
29 | 27 | | |
30 | 28 | | |
| |||
0 commit comments