Skip to content

Commit

Permalink
Collapse Substs::identity_for_item in collect
Browse files Browse the repository at this point in the history
  • Loading branch information
varkor committed May 15, 2018
1 parent 39a68e9 commit 5ea91ac
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/librustc_typeck/collect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1096,9 +1096,7 @@ fn type_of<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
}

let substs = ty::ClosureSubsts {
substs: Substs::for_item(tcx, def_id, |param, _| {
tcx.mk_param_from_def(param)
})
substs: Substs::identity_for_item(tcx, def_id),
};

tcx.mk_closure(def_id, substs)
Expand Down

0 comments on commit 5ea91ac

Please sign in to comment.