Rollup merge of #140214 - compiler-errors:remove-hack, r=lcnr

Remove comment about handling non-global where bounds with corresponding projection

This comment is no longer relevant since we only assemble rigid projections if no param-env candidates hold.

Also remove a stray comment from the old solver.

r? lcnr
This commit is contained in:
Matthias Krüger
2025-04-24 11:40:46 +02:00
committed by GitHub
2 changed files with 0 additions and 14 deletions

View File

@@ -1308,18 +1308,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,