Skip to content

Commit f821bdb

Browse files
Remove hack
1 parent 7bf7bfb commit f821bdb

File tree

2 files changed

+0
-14
lines changed

2 files changed

+0
-14
lines changed

compiler/rustc_next_trait_solver/src/solve/trait_goals.rs

-12
Original file line numberDiff line numberDiff line change
@@ -1329,18 +1329,6 @@ where
13291329
return true;
13301330
}
13311331

1332-
// We don't consider a trait-bound global if it has a projection bound.
1333-
//
1334-
// See ui/traits/next-solver/normalization-shadowing/global-trait-with-project.rs
1335-
// for an example where this is necessary.
1336-
for p in goal.param_env.caller_bounds().iter() {
1337-
if let ty::ClauseKind::Projection(proj) = p.kind().skip_binder() {
1338-
if proj.projection_term.trait_ref(self.cx()) == trait_pred.trait_ref {
1339-
return true;
1340-
}
1341-
}
1342-
}
1343-
13441332
false
13451333
}
13461334
_ => false,

compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs

-2
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,6 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
240240
if !drcx.args_may_unify(obligation_args, bound_trait_ref.skip_binder().args) {
241241
continue;
242242
}
243-
// FIXME(oli-obk): it is suspicious that we are dropping the constness and
244-
// polarity here.
245243
let wc = self.where_clause_may_apply(stack, bound_trait_ref)?;
246244
if wc.may_apply() {
247245
candidates.vec.push(ParamCandidate(bound));

0 commit comments

Comments
 (0)