diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-04-14 07:58:42 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-14 07:58:42 +0200 |
| commit | 610bc6867588ae74d28932fc77c003ba3377634a (patch) | |
| tree | 0a5477c0866e5f747d4250ddc4b48ea57e4425db /compiler/rustc_trait_selection/src | |
| parent | a7889d1730d48fa987c513f97250f3a3570a919e (diff) | |
| parent | 8d5ee1a0729b91545e856dbf14fd75687dc9e2b8 (diff) | |
| download | rust-610bc6867588ae74d28932fc77c003ba3377634a.tar.gz rust-610bc6867588ae74d28932fc77c003ba3377634a.zip | |
Rollup merge of #110299 - kylematsuda:earlybinder-impl-subject, r=compiler-errors
Switch to `EarlyBinder` for `impl_subject` query Part of the work to finish https://github.com/rust-lang/rust/issues/105779. Several queries `X` have a `bound_X` variant that wraps the output in `EarlyBinder`. This adds `EarlyBinder` to the return type of the `impl_subject` query and removes `bound_impl_subject`. r? ```@lcnr```
Diffstat (limited to 'compiler/rustc_trait_selection/src')
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/coherence.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/util.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/coherence.rs b/compiler/rustc_trait_selection/src/traits/coherence.rs index 3c918b6028d..20c2605f219 100644 --- a/compiler/rustc_trait_selection/src/traits/coherence.rs +++ b/compiler/rustc_trait_selection/src/traits/coherence.rs @@ -306,7 +306,7 @@ fn negative_impl(tcx: TyCtxt<'_>, impl1_def_id: DefId, impl2_def_id: DefId) -> b &infcx, ObligationCause::dummy(), impl_env, - tcx.impl_subject(impl1_def_id), + tcx.impl_subject(impl1_def_id).subst_identity(), ) { Ok(s) => s, Err(err) => { diff --git a/compiler/rustc_trait_selection/src/traits/util.rs b/compiler/rustc_trait_selection/src/traits/util.rs index 60630979b34..20357d4d250 100644 --- a/compiler/rustc_trait_selection/src/traits/util.rs +++ b/compiler/rustc_trait_selection/src/traits/util.rs @@ -198,7 +198,7 @@ pub fn impl_subject_and_oblig<'a, 'tcx>( impl_def_id: DefId, impl_substs: SubstsRef<'tcx>, ) -> (ImplSubject<'tcx>, impl Iterator<Item = PredicateObligation<'tcx>>) { - let subject = selcx.tcx().bound_impl_subject(impl_def_id); + let subject = selcx.tcx().impl_subject(impl_def_id); let subject = subject.subst(selcx.tcx(), impl_substs); let InferOk { value: subject, obligations: normalization_obligations1 } = |
