Skip to content

Commit 2d9acd7

Browse files
committed
---
yaml --- r: 228693 b: refs/heads/try c: 71d4418 h: refs/heads/master i: 228691: e153e17 v: v3
1 parent a16dd22 commit 2d9acd7

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
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: aca2057ed5fb7af3f8905b2bc01f72fa001c35c8
33
refs/heads/snap-stage3: 1af31d4974e33027a68126fa5a5a3c2c6491824f
4-
refs/heads/try: d075faa2ed2a9290a4ac114ff6e0b87c03e86b98
4+
refs/heads/try: 71d44189e04d714a64c304f00a7ebfd48150b93a
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
77
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try/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/try/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/try/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)