2016-08-14 06:34:14 +03:00
|
|
|
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
|
|
|
|
// file at the top-level directory of this distribution and at
|
|
|
|
// http://rust-lang.org/COPYRIGHT.
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
|
|
|
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
|
|
|
// option. This file may not be copied, modified, or distributed
|
|
|
|
// except according to those terms.
|
|
|
|
|
2016-08-17 06:32:00 +03:00
|
|
|
// ignore-tidy-linelength
|
|
|
|
|
2016-08-14 06:34:14 +03:00
|
|
|
fn main() {
|
|
|
|
let a = 0;
|
|
|
|
{
|
|
|
|
let b = &Some(a);
|
|
|
|
}
|
|
|
|
let c = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
// END RUST SOURCE
|
2017-11-04 14:27:08 +03:00
|
|
|
// START rustc.main.TypeckMir.before.mir
|
2016-08-14 06:34:14 +03:00
|
|
|
// bb0: {
|
2016-09-29 01:22:11 +02:00
|
|
|
// StorageLive(_1);
|
|
|
|
// _1 = const 0i32;
|
|
|
|
// StorageLive(_3);
|
|
|
|
// StorageLive(_4);
|
|
|
|
// StorageLive(_5);
|
|
|
|
// _5 = _1;
|
2017-11-17 18:22:44 +02:00
|
|
|
// _4 = std::option::Option<i32>::Some(move _5,);
|
2016-09-29 01:22:11 +02:00
|
|
|
// StorageDead(_5);
|
2017-02-26 16:21:08 +02:00
|
|
|
// _3 = &_4;
|
2016-09-29 01:22:11 +02:00
|
|
|
// _2 = ();
|
2017-02-26 16:21:26 +02:00
|
|
|
// StorageDead(_4);
|
2018-07-03 18:09:00 -07:00
|
|
|
// StorageDead(_3);
|
2016-09-29 01:22:11 +02:00
|
|
|
// StorageLive(_6);
|
|
|
|
// _6 = const 1i32;
|
|
|
|
// _0 = ();
|
|
|
|
// StorageDead(_6);
|
|
|
|
// StorageDead(_1);
|
2017-10-09 23:14:13 -04:00
|
|
|
// return;
|
2017-02-26 16:21:08 +02:00
|
|
|
// }
|
2017-11-04 14:27:08 +03:00
|
|
|
// END rustc.main.TypeckMir.before.mir
|