]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/storage_ranges.rs
Rollup merge of #44513 - redox-os:master, r=alexcrichton
[rust.git] / src / test / mir-opt / storage_ranges.rs
1 // Copyright 2016 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
4 //
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
10
11 // ignore-tidy-linelength
12
13 fn main() {
14     let a = 0;
15     {
16         let b = &Some(a);
17     }
18     let c = 1;
19 }
20
21 // END RUST SOURCE
22 // START rustc.node4.TypeckMir.before.mir
23 //     bb0: {
24 //         StorageLive(_1);
25 //         _1 = const 0i32;
26 //         StorageLive(_3);
27 //         StorageLive(_4);
28 //         StorageLive(_5);
29 //         _5 = _1;
30 //         _4 = std::option::Option<i32>::Some(_5,);
31 //         StorageDead(_5);
32 //         _3 = &_4;
33 //         _2 = ();
34 //         StorageDead(_3);
35 //         StorageDead(_4);
36 //         StorageLive(_6);
37 //         _6 = const 1i32;
38 //         _0 = ();
39 //         StorageDead(_6);
40 //         StorageDead(_1);
41 //      }
42 // END rustc.node4.TypeckMir.before.mir