Skip to content

Commit 881e0d8

Browse files
compiler-errorslcnr
authored andcommitted
Remove hack
1 parent e62e7a6 commit 881e0d8

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
@@ -1308,18 +1308,6 @@ where
13081308
return true;
13091309
}
13101310

1311-
// We don't consider a trait-bound global if it has a projection bound.
1312-
//
1313-
// See ui/traits/next-solver/normalization-shadowing/global-trait-with-project.rs
1314-
// for an example where this is necessary.
1315-
for p in goal.param_env.caller_bounds().iter() {
1316-
if let ty::ClauseKind::Projection(proj) = p.kind().skip_binder() {
1317-
if proj.projection_term.trait_ref(self.cx()) == trait_pred.trait_ref {
1318-
return true;
1319-
}
1320-
}
1321-
}
1322-
13231311
false
13241312
}
13251313
_ => 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)