Skip to content

Commit e603a06

Browse files
committed
---
yaml --- r: 277418 b: refs/heads/try c: 89edd96 h: refs/heads/master
1 parent fd6b8c4 commit e603a06

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,7 +1,7 @@
11
---
22
refs/heads/master: 6dbb0e86aec11050480beb76eade6fb805010ba7
33
refs/heads/snap-stage3: 235d77457d80b549dad3ac36d94f235208a1eafb
4-
refs/heads/try: 869172305f66ba11565c90f9276328c479d5b082
4+
refs/heads/try: 89edd96be86fd65d63f63a208062c8baf86e7d7c
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_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 { .. } |

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