Commit 961351c
committed
Auto merge of rust-lang#138249 - compiler-errors:auto-self, r=lcnr
Do not register `Self: AutoTrait` when confirming auto trait (in old solver)
Every built-in auto impl for a trait goal like `Ty: Auto` immediately registers another obligation of `Ty: Auto` as one of its nested obligations, leading to us stressing the cycle detection machinery a lot more than we need to. This is because all traits have a `Self: Trait` predicate.
To fix this, remove the call to `impl_or_trait_obligations` in `vtable_auto_impl`, since auto traits do not have where clauses.
r? lcnrFile tree
3 files changed
+4
-43
lines changed- compiler/rustc_trait_selection/src/traits/select
- tests/ui/traits/inductive-overflow
3 files changed
+4
-43
lines changedLines changed: 1 addition & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
463 | 463 | | |
464 | 464 | | |
465 | 465 | | |
466 | | - | |
467 | | - | |
468 | | - | |
469 | | - | |
470 | | - | |
471 | | - | |
472 | | - | |
473 | | - | |
474 | | - | |
475 | | - | |
476 | 466 | | |
477 | | - | |
| 467 | + | |
478 | 468 | | |
479 | 469 | | |
480 | 470 | | |
481 | 471 | | |
482 | 472 | | |
483 | 473 | | |
484 | 474 | | |
485 | | - | |
486 | | - | |
487 | | - | |
488 | | - | |
489 | 475 | | |
490 | 476 | | |
491 | 477 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
Lines changed: 2 additions & 27 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
| 9 | + | |
34 | 10 | | |
35 | | - | |
36 | | - | |
| 11 | + | |
0 commit comments