Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit b720eb2

Browse files
Only elaborate principal in object_region_bounds
1 parent ff1737b commit b720eb2

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

compiler/rustc_hir_analysis/src/hir_ty_lowering/dyn_compatibility.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,6 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
194194
for def_ids in associated_types.values_mut() {
195195
for (projection_bound, span) in &projection_bounds {
196196
let def_id = projection_bound.projection_def_id();
197-
// FIXME(#120456) - is `swap_remove` correct?
198197
def_ids.swap_remove(&def_id);
199198
if tcx.generics_require_sized_self(def_id) {
200199
tcx.emit_node_span_lint(

compiler/rustc_trait_selection/src/traits/wf.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -970,10 +970,10 @@ pub fn object_region_bounds<'tcx>(
970970
existential_predicates: &'tcx ty::List<ty::PolyExistentialPredicate<'tcx>>,
971971
) -> Vec<ty::Region<'tcx>> {
972972
let predicates = existential_predicates.iter().filter_map(|predicate| {
973-
if let ty::ExistentialPredicate::Projection(_) = predicate.skip_binder() {
974-
None
975-
} else {
973+
if let ty::ExistentialPredicate::Trait(_) = predicate.skip_binder() {
976974
Some(predicate.with_self_ty(tcx, tcx.types.trait_object_dummy_self))
975+
} else {
976+
None
977977
}
978978
});
979979

0 commit comments

Comments
 (0)