diff options
| author | varkor <github@varkor.com> | 2018-05-15 13:53:20 +0100 |
|---|---|---|
| committer | varkor <github@varkor.com> | 2018-05-15 14:22:25 +0100 |
| commit | 5ea91ac531de9e309a495538a84f84ec9653bd51 (patch) | |
| tree | 58fa136cc121bc280f88bbb50250439ab9b6721c | |
| parent | 39a68e9069a8673be1e3a51173327f82c9daf986 (diff) | |
| download | rust-5ea91ac531de9e309a495538a84f84ec9653bd51.tar.gz rust-5ea91ac531de9e309a495538a84f84ec9653bd51.zip | |
Collapse Substs::identity_for_item in collect
| -rw-r--r-- | src/librustc_typeck/collect.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/librustc_typeck/collect.rs b/src/librustc_typeck/collect.rs index d659dae2503..c2dde2d2e01 100644 --- a/src/librustc_typeck/collect.rs +++ b/src/librustc_typeck/collect.rs @@ -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) |
