Skip to content

Commit

Permalink
remove an unnecessary Option
Browse files Browse the repository at this point in the history
  • Loading branch information
TaKO8Ki committed Jun 1, 2022
1 parent 395a09c commit 8d007aa
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
13 changes: 10 additions & 3 deletions compiler/rustc_trait_selection/src/traits/wf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,17 @@ pub fn trait_obligations<'a, 'tcx>(
body_id: hir::HirId,
trait_ref: &ty::TraitRef<'tcx>,
span: Span,
item: Option<&'tcx hir::Item<'tcx>>,
item: &'tcx hir::Item<'tcx>,
) -> Vec<traits::PredicateObligation<'tcx>> {
let mut wf =
WfPredicates { infcx, param_env, body_id, span, out: vec![], recursion_depth: 0, item };
let mut wf = WfPredicates {
infcx,
param_env,
body_id,
span,
out: vec![],
recursion_depth: 0,
item: Some(item),
};
wf.compute_trait_ref(trait_ref, Elaborate::All);
debug!(obligations = ?wf.out);
wf.normalize()
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_typeck/src/check/wfcheck.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1228,7 +1228,7 @@ fn check_impl<'tcx>(
fcx.body_id,
&trait_ref,
ast_trait_ref.path.span,
Some(item),
item,
);
debug!(?obligations);
for obligation in obligations {
Expand Down

0 comments on commit 8d007aa

Please sign in to comment.