diff options
| author | Takayuki Maeda <41065217+TaKO8Ki@users.noreply.github.com> | 2022-06-01 17:06:07 +0900 |
|---|---|---|
| committer | Takayuki Maeda <41065217+TaKO8Ki@users.noreply.github.com> | 2022-06-01 17:06:07 +0900 |
| commit | 8d007aa06d01353f7154d5dc681ba5db7c52514f (patch) | |
| tree | 512d9f31c11d5ca5570c20ee977580ff940f03b8 /compiler/rustc_trait_selection/src/traits | |
| parent | 395a09c3dafe0c7838c9ca41d2b47bb5e79a5b6d (diff) | |
remove an unnecessary `Option`
Diffstat (limited to 'compiler/rustc_trait_selection/src/traits')
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/wf.rs | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/wf.rs b/compiler/rustc_trait_selection/src/traits/wf.rs index 0379b16334c..2ce2a44d3db 100644 --- a/compiler/rustc_trait_selection/src/traits/wf.rs +++ b/compiler/rustc_trait_selection/src/traits/wf.rs @@ -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() |
