remove an unnecessary Option
This commit is contained in:
parent
395a09c3da
commit
8d007aa06d
@ -81,10 +81,17 @@ pub fn trait_obligations<'a, 'tcx>(
|
|||||||
body_id: hir::HirId,
|
body_id: hir::HirId,
|
||||||
trait_ref: &ty::TraitRef<'tcx>,
|
trait_ref: &ty::TraitRef<'tcx>,
|
||||||
span: Span,
|
span: Span,
|
||||||
item: Option<&'tcx hir::Item<'tcx>>,
|
item: &'tcx hir::Item<'tcx>,
|
||||||
) -> Vec<traits::PredicateObligation<'tcx>> {
|
) -> Vec<traits::PredicateObligation<'tcx>> {
|
||||||
let mut wf =
|
let mut wf = WfPredicates {
|
||||||
WfPredicates { infcx, param_env, body_id, span, out: vec![], recursion_depth: 0, item };
|
infcx,
|
||||||
|
param_env,
|
||||||
|
body_id,
|
||||||
|
span,
|
||||||
|
out: vec![],
|
||||||
|
recursion_depth: 0,
|
||||||
|
item: Some(item),
|
||||||
|
};
|
||||||
wf.compute_trait_ref(trait_ref, Elaborate::All);
|
wf.compute_trait_ref(trait_ref, Elaborate::All);
|
||||||
debug!(obligations = ?wf.out);
|
debug!(obligations = ?wf.out);
|
||||||
wf.normalize()
|
wf.normalize()
|
||||||
|
@ -1228,7 +1228,7 @@ fn check_impl<'tcx>(
|
|||||||
fcx.body_id,
|
fcx.body_id,
|
||||||
&trait_ref,
|
&trait_ref,
|
||||||
ast_trait_ref.path.span,
|
ast_trait_ref.path.span,
|
||||||
Some(item),
|
item,
|
||||||
);
|
);
|
||||||
debug!(?obligations);
|
debug!(?obligations);
|
||||||
for obligation in obligations {
|
for obligation in obligations {
|
||||||
|
Loading…
Reference in New Issue
Block a user