Skip to content

Commit

Permalink
Simplify some internal code
Browse files Browse the repository at this point in the history
Addresses #2709
  • Loading branch information
imp committed May 1, 2018
1 parent f69dd6a commit e94ec44
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions clippy_lints/src/utils/mod.rs
Expand Up @@ -301,9 +301,7 @@ pub fn implements_trait<'a, 'tcx>(
let obligation =
cx.tcx
.predicate_for_trait_def(cx.param_env, traits::ObligationCause::dummy(), trait_id, 0, ty, ty_params);
cx.tcx.infer_ctxt().enter(|infcx| {
traits::SelectionContext::new(&infcx).infcx().predicate_must_hold(&obligation)
})
cx.tcx.infer_ctxt().enter(|infcx| infcx.predicate_must_hold(&obligation))
}

/// Check whether this type implements Drop.
Expand Down

0 comments on commit e94ec44

Please sign in to comment.