Skip to content

Commit e94ec44

Browse files
committed
Simplify some internal code
Addresses rust-lang#2709
1 parent f69dd6a commit e94ec44

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

clippy_lints/src/utils/mod.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -301,9 +301,7 @@ pub fn implements_trait<'a, 'tcx>(
301301
let obligation =
302302
cx.tcx
303303
.predicate_for_trait_def(cx.param_env, traits::ObligationCause::dummy(), trait_id, 0, ty, ty_params);
304-
cx.tcx.infer_ctxt().enter(|infcx| {
305-
traits::SelectionContext::new(&infcx).infcx().predicate_must_hold(&obligation)
306-
})
304+
cx.tcx.infer_ctxt().enter(|infcx| infcx.predicate_must_hold(&obligation))
307305
}
308306

309307
/// Check whether this type implements Drop.

0 commit comments

Comments
 (0)