mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-29 10:13:54 +00:00
parent
f69dd6ad2c
commit
e94ec44ab3
@ -301,9 +301,7 @@ pub fn implements_trait<'a, 'tcx>(
|
|||||||
let obligation =
|
let obligation =
|
||||||
cx.tcx
|
cx.tcx
|
||||||
.predicate_for_trait_def(cx.param_env, traits::ObligationCause::dummy(), trait_id, 0, ty, ty_params);
|
.predicate_for_trait_def(cx.param_env, traits::ObligationCause::dummy(), trait_id, 0, ty, ty_params);
|
||||||
cx.tcx.infer_ctxt().enter(|infcx| {
|
cx.tcx.infer_ctxt().enter(|infcx| infcx.predicate_must_hold(&obligation))
|
||||||
traits::SelectionContext::new(&infcx).infcx().predicate_must_hold(&obligation)
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Check whether this type implements Drop.
|
/// Check whether this type implements Drop.
|
||||||
|
Loading…
Reference in New Issue
Block a user