diff options
| author | Michael Goulet <michael@errs.io> | 2025-07-06 20:02:45 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2025-07-08 16:33:38 +0000 |
| commit | 8d2d4eb89af09104bd1306073320d3e67ead5fe6 (patch) | |
| tree | 4d936fc4056a2f58b52023d64fd4f2a9e716c531 /compiler/rustc_trait_selection/src/traits/select/confirmation.rs | |
| parent | 040e2f8b9ff2d76fbe2146d6003e297ed4532088 (diff) | |
| download | rust-8d2d4eb89af09104bd1306073320d3e67ead5fe6.tar.gz rust-8d2d4eb89af09104bd1306073320d3e67ead5fe6.zip | |
Instantiate auto trait before computing higher-ranked constituent types
Diffstat (limited to 'compiler/rustc_trait_selection/src/traits/select/confirmation.rs')
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/select/confirmation.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/select/confirmation.rs b/compiler/rustc_trait_selection/src/traits/select/confirmation.rs index 545531f927a..b5408ef3c51 100644 --- a/compiler/rustc_trait_selection/src/traits/select/confirmation.rs +++ b/compiler/rustc_trait_selection/src/traits/select/confirmation.rs @@ -403,6 +403,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> { let self_ty = obligation.predicate.self_ty().map_bound(|ty| self.infcx.shallow_resolve(ty)); + let self_ty = self.infcx.enter_forall_and_leak_universe(self_ty); let types = self.constituent_types_for_ty(self_ty)?; let types = self.infcx.enter_forall_and_leak_universe(types); |
