Skip to content

Commit 757db81

Browse files
committed
---
yaml --- r: 275959 b: refs/heads/master c: 89edd96 h: refs/heads/master i: 275957: 46a6a99 275955: 8a5fb80 275951: e9b702a
1 parent a5bcbec commit 757db81

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 869172305f66ba11565c90f9276328c479d5b082
2+
refs/heads/master: 89edd96be86fd65d63f63a208062c8baf86e7d7c
33
refs/heads/snap-stage3: 235d77457d80b549dad3ac36d94f235208a1eafb
44
refs/heads/try: 49312a405e14a449b98fe0056b12a40ac128be4a
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

trunk/src/librustc_mir/build/expr/as_rvalue.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,11 @@ impl<'a,'tcx> Builder<'a,'tcx> {
189189
block.and(Rvalue::Aggregate(AggregateKind::Adt(adt_def, variant_index, substs),
190190
fields))
191191
}
192+
ExprKind::Assign { .. } |
193+
ExprKind::AssignOp { .. } => {
194+
block = unpack!(this.stmt_expr(block, expr));
195+
block.and(this.unit_rvalue())
196+
}
192197
ExprKind::Literal { .. } |
193198
ExprKind::Block { .. } |
194199
ExprKind::Match { .. } |
@@ -201,8 +206,6 @@ impl<'a,'tcx> Builder<'a,'tcx> {
201206
ExprKind::Index { .. } |
202207
ExprKind::VarRef { .. } |
203208
ExprKind::SelfRef |
204-
ExprKind::Assign { .. } |
205-
ExprKind::AssignOp { .. } |
206209
ExprKind::Break { .. } |
207210
ExprKind::Continue { .. } |
208211
ExprKind::Return { .. } |

trunk/src/librustc_mir/build/misc.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ impl<'a,'tcx> Builder<'a,'tcx> {
4646
Operand::Constant(constant)
4747
}
4848

49+
pub fn unit_rvalue(&mut self) -> Rvalue<'tcx> {
50+
Rvalue::Aggregate(AggregateKind::Tuple, vec![])
51+
}
52+
4953
pub fn push_usize(&mut self,
5054
block: BasicBlock,
5155
scope_id: ScopeId,

0 commit comments

Comments
 (0)