Skip to content

Commit 024ad36

Browse files
committed
---
yaml --- r: 235764 b: refs/heads/stable c: 71d4418 h: refs/heads/master v: v3
1 parent e7f463b commit 024ad36

File tree

4 files changed

+5
-11
lines changed

4 files changed

+5
-11
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/heads/tmp: afae2ff723393b3ab4ccffef6ac7c6d1809e2da0
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: f859507de8c410b648d934d8f5ec1c52daac971d
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: d075faa2ed2a9290a4ac114ff6e0b87c03e86b98
32+
refs/heads/stable: 71d44189e04d714a64c304f00a7ebfd48150b93a
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/src/librustc_trans/trans/closure.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,7 @@ pub fn get_or_create_closure_declaration<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>,
148148
});
149149

150150
let function_type = ccx.tcx().mk_closure_from_closure_substs(closure_id, Box::new(substs));
151-
let llfn = declare::define_internal_rust_fn(ccx, &symbol[..], function_type).unwrap_or_else(||{
152-
ccx.sess().bug(&format!("symbol `{}` already defined", symbol));
153-
});
151+
let llfn = declare::define_internal_rust_fn(ccx, &symbol[..], function_type);
154152

155153
// set an inline hint for all closures
156154
attributes::inline(llfn, attributes::InlineAttr::Hint);

branches/stable/src/librustc_trans/trans/debuginfo/metadata.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -811,14 +811,10 @@ pub fn type_metadata<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>,
811811
MetadataCreationResult::new(pointer_type_metadata(cx, t, fn_metadata), false)
812812

813813
}
814-
ty::TyClosure(def_id, ref substs) => {
815-
let infcx = infer::normalizing_infer_ctxt(cx.tcx(), &cx.tcx().tables);
816-
let upvars = infcx.closure_upvars(def_id, substs).unwrap();
817-
let upvar_types = upvars.iter().map(|u| u.ty).collect::<Vec<_>>();
818-
814+
ty::TyClosure(_, ref substs) => {
819815
prepare_tuple_metadata(cx,
820816
t,
821-
&upvar_types[..],
817+
&substs.upvar_tys,
822818
unique_type_id,
823819
usage_site_span).finalize(cx)
824820
}

branches/stable/src/librustc_trans/trans/debuginfo/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ pub fn create_function_debug_context<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>,
416416
ty::TyBareFn(_, ref barefnty) => {
417417
(cx.tcx().erase_late_bound_regions(&barefnty.sig), barefnty.abi)
418418
}
419-
ty::TyClosure(def_id, substs) => {
419+
ty::TyClosure(def_id, ref substs) => {
420420
let closure_type = cx.tcx().closure_type(def_id, substs);
421421
(cx.tcx().erase_late_bound_regions(&closure_type.sig), closure_type.abi)
422422
}

0 commit comments

Comments
 (0)