Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 282035
b: refs/heads/stable
c: 41fc5f7
h: refs/heads/master
i:
  282033: ed845d4
  282031: 6dd4c5f
  • Loading branch information
eddyb committed Mar 17, 2016
1 parent e81b742 commit ffdb1ec
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
refs/tags/homu-tmp: 3c795e08d6f4a532f12f3f8e1837db5e0647f8b0
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
refs/heads/stable: 6c551b376659006afb349e15c594fc147a7e0ff6
refs/heads/stable: 41fc5f7c2a046952dc624c0617a73c14a37b5940
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e
Expand Down
25 changes: 25 additions & 0 deletions branches/stable/src/librustc_trans/trans/mir/rvalue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,31 @@ impl<'bcx, 'tcx> MirContext<'bcx, 'tcx> {
}
},
_ => {
// FIXME Shouldn't need to manually trigger closure instantiations.
if let mir::AggregateKind::Closure(def_id, substs) = *kind {
use rustc_front::hir;
use syntax::ast::DUMMY_NODE_ID;
use syntax::codemap::DUMMY_SP;
use syntax::ptr::P;
use trans::closure;

closure::trans_closure_expr(closure::Dest::Ignore(bcx.ccx()),
&hir::FnDecl {
inputs: P::new(),
output: hir::NoReturn(DUMMY_SP),
variadic: false
},
&hir::Block {
stmts: P::new(),
expr: None,
id: DUMMY_NODE_ID,
rules: hir::DefaultBlock,
span: DUMMY_SP
},
DUMMY_NODE_ID, def_id,
&bcx.monomorphize(substs));
}

for (i, operand) in operands.iter().enumerate() {
let op = self.trans_operand(&bcx, operand);
// Do not generate stores and GEPis for zero-sized fields.
Expand Down

0 comments on commit ffdb1ec

Please sign in to comment.