Skip to content

Commit ffdb1ec

Browse files
committed
---
yaml --- r: 282035 b: refs/heads/stable c: 41fc5f7 h: refs/heads/master i: 282033: ed845d4 282031: 6dd4c5f
1 parent e81b742 commit ffdb1ec

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: 3c795e08d6f4a532f12f3f8e1837db5e0647f8b0
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: 6c551b376659006afb349e15c594fc147a7e0ff6
32+
refs/heads/stable: 41fc5f7c2a046952dc624c0617a73c14a37b5940
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/mir/rvalue.rs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,31 @@ impl<'bcx, 'tcx> MirContext<'bcx, 'tcx> {
132132
}
133133
},
134134
_ => {
135+
// FIXME Shouldn't need to manually trigger closure instantiations.
136+
if let mir::AggregateKind::Closure(def_id, substs) = *kind {
137+
use rustc_front::hir;
138+
use syntax::ast::DUMMY_NODE_ID;
139+
use syntax::codemap::DUMMY_SP;
140+
use syntax::ptr::P;
141+
use trans::closure;
142+
143+
closure::trans_closure_expr(closure::Dest::Ignore(bcx.ccx()),
144+
&hir::FnDecl {
145+
inputs: P::new(),
146+
output: hir::NoReturn(DUMMY_SP),
147+
variadic: false
148+
},
149+
&hir::Block {
150+
stmts: P::new(),
151+
expr: None,
152+
id: DUMMY_NODE_ID,
153+
rules: hir::DefaultBlock,
154+
span: DUMMY_SP
155+
},
156+
DUMMY_NODE_ID, def_id,
157+
&bcx.monomorphize(substs));
158+
}
159+
135160
for (i, operand) in operands.iter().enumerate() {
136161
let op = self.trans_operand(&bcx, operand);
137162
// Do not generate stores and GEPis for zero-sized fields.

0 commit comments

Comments
 (0)