Remove hack

This commit is contained in:
Michael Goulet
2025-04-23 17:02:43 +00:00
parent 6bc57c6bf7
commit 1162f42b86
2 changed files with 0 additions and 14 deletions

View File

@@ -1298,18 +1298,6 @@ where
return true;
}
// We don't consider a trait-bound global if it has a projection bound.
//
// See ui/traits/next-solver/normalization-shadowing/global-trait-with-project.rs
// for an example where this is necessary.
for p in goal.param_env.caller_bounds().iter() {
if let ty::ClauseKind::Projection(proj) = p.kind().skip_binder() {
if proj.projection_term.trait_ref(self.cx()) == trait_pred.trait_ref {
return true;
}
}
}
false
}
_ => false,