Skip to content

Commit 1162f42

Browse files
Remove hack
1 parent 6bc57c6 commit 1162f42

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
@@ -1298,18 +1298,6 @@ where
12981298
return true;
12991299
}
13001300

1301-
// We don't consider a trait-bound global if it has a projection bound.
1302-
//
1303-
// See ui/traits/next-solver/normalization-shadowing/global-trait-with-project.rs
1304-
// for an example where this is necessary.
1305-
for p in goal.param_env.caller_bounds().iter() {
1306-
if let ty::ClauseKind::Projection(proj) = p.kind().skip_binder() {
1307-
if proj.projection_term.trait_ref(self.cx()) == trait_pred.trait_ref {
1308-
return true;
1309-
}
1310-
}
1311-
}
1312-
13131301
false
13141302
}
13151303
_ => 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)