parent
af8c2339cf
commit
a6e24fc31f
@ -273,7 +273,9 @@ pub fn into_expr(&mut self,
|
||||
ExprKind::Break { .. } |
|
||||
ExprKind::InlineAsm { .. } |
|
||||
ExprKind::Return {.. } => {
|
||||
this.stmt_expr(block, expr)
|
||||
unpack!(block = this.stmt_expr(block, expr));
|
||||
this.cfg.push_assign_unit(block, source_info, destination);
|
||||
block.unit()
|
||||
}
|
||||
|
||||
// these are the cases that are more naturally handled by some other mode
|
||||
|
@ -54,6 +54,7 @@ fn main() {
|
||||
// Validate(Acquire, [_1: &ReFree(DefId(0/1:9 ~ validate_4[317d]::write_42[0]::{{closure}}[0]), BrEnv) [closure@NodeId(22)], _2: *mut i32]);
|
||||
// Validate(Release, [_1: &ReFree(DefId(0/1:9 ~ validate_4[317d]::write_42[0]::{{closure}}[0]), BrEnv) [closure@NodeId(22)], _2: *mut i32]);
|
||||
// (*_2) = const 23i32;
|
||||
// _0 = ();
|
||||
// return;
|
||||
// }
|
||||
// }
|
||||
|
@ -8,6 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z borrowck=compare
|
||||
|
||||
use std::cell::Cell;
|
||||
use std::mem::swap;
|
||||
|
Loading…
Reference in New Issue
Block a user