1// MIR for `foo` after Inline
2
3fn foo(_1: T, _2: i32) -> (i32, T) {
4    debug t => _1;                       // in scope 0 at $DIR/inline-closure-captures.rs:10:17: 10:18
5    debug q => _2;                       // in scope 0 at $DIR/inline-closure-captures.rs:10:23: 10:24
6    let mut _0: (i32, T);                // return place in scope 0 at $DIR/inline-closure-captures.rs:10:34: 10:42
7    let _3: [closure@foo<T>::{closure#0}]; // in scope 0 at $DIR/inline-closure-captures.rs:11:9: 11:10
8    let mut _4: &i32;                    // in scope 0 at $DIR/inline-closure-captures.rs:11:13: 11:24
9    let mut _5: &T;                      // in scope 0 at $DIR/inline-closure-captures.rs:11:13: 11:24
10    let mut _6: &[closure@foo<T>::{closure#0}]; // in scope 0 at $DIR/inline-closure-captures.rs:12:5: 12:6
11    let mut _7: (i32,);                  // in scope 0 at $DIR/inline-closure-captures.rs:12:5: 12:9
12    let mut _8: i32;                     // in scope 0 at $DIR/inline-closure-captures.rs:12:7: 12:8
13    let mut _9: i32;                     // in scope 0 at $DIR/inline-closure-captures.rs:12:5: 12:9
14    scope 1 {
15        debug x => _3;                   // in scope 1 at $DIR/inline-closure-captures.rs:11:9: 11:10
16        scope 2 (inlined foo::<T>::{closure#0}) { // at $DIR/inline-closure-captures.rs:12:5: 12:9
17            debug _q => _9;              // in scope 2 at $DIR/inline-closure-captures.rs:12:5: 12:9
18            debug q => (*((*_6).0: &i32)); // in scope 2 at $DIR/inline-closure-captures.rs:12:5: 12:9
19            debug t => (*((*_6).1: &T)); // in scope 2 at $DIR/inline-closure-captures.rs:12:5: 12:9
20            let mut _10: i32;            // in scope 2 at $DIR/inline-closure-captures.rs:12:5: 12:9
21            let mut _11: T;              // in scope 2 at $DIR/inline-closure-captures.rs:12:5: 12:9
22        }
23    }
24
25    bb0: {
26        StorageLive(_3);                 // scope 0 at $DIR/inline-closure-captures.rs:11:9: 11:10
27        StorageLive(_4);                 // scope 0 at $DIR/inline-closure-captures.rs:11:13: 11:24
28        _4 = &_2;                        // scope 0 at $DIR/inline-closure-captures.rs:11:13: 11:24
29        StorageLive(_5);                 // scope 0 at $DIR/inline-closure-captures.rs:11:13: 11:24
30        _5 = &_1;                        // scope 0 at $DIR/inline-closure-captures.rs:11:13: 11:24
31        (_3.0: &i32) = move _4;          // scope 0 at $DIR/inline-closure-captures.rs:11:13: 11:24
32        (_3.1: &T) = move _5;            // scope 0 at $DIR/inline-closure-captures.rs:11:13: 11:24
33        StorageDead(_5);                 // scope 0 at $DIR/inline-closure-captures.rs:11:23: 11:24
34        StorageDead(_4);                 // scope 0 at $DIR/inline-closure-captures.rs:11:23: 11:24
35        StorageLive(_6);                 // scope 1 at $DIR/inline-closure-captures.rs:12:5: 12:6
36        _6 = &_3;                        // scope 1 at $DIR/inline-closure-captures.rs:12:5: 12:6
37        StorageLive(_7);                 // scope 1 at $DIR/inline-closure-captures.rs:12:5: 12:9
38        StorageLive(_8);                 // scope 1 at $DIR/inline-closure-captures.rs:12:7: 12:8
39        _8 = _2;                         // scope 1 at $DIR/inline-closure-captures.rs:12:7: 12:8
40        (_7.0: i32) = move _8;           // scope 1 at $DIR/inline-closure-captures.rs:12:5: 12:9
41        StorageLive(_9);                 // scope 1 at $DIR/inline-closure-captures.rs:12:5: 12:9
42        _9 = move (_7.0: i32);           // scope 1 at $DIR/inline-closure-captures.rs:12:5: 12:9
43        StorageLive(_10);                // scope 2 at $DIR/inline-closure-captures.rs:12:5: 12:9
44        _10 = (*((*_6).0: &i32));        // scope 2 at $DIR/inline-closure-captures.rs:12:5: 12:9
45        StorageLive(_11);                // scope 2 at $DIR/inline-closure-captures.rs:12:5: 12:9
46        _11 = (*((*_6).1: &T));          // scope 2 at $DIR/inline-closure-captures.rs:12:5: 12:9
47        (_0.0: i32) = move _10;          // scope 2 at $DIR/inline-closure-captures.rs:12:5: 12:9
48        (_0.1: T) = move _11;            // scope 2 at $DIR/inline-closure-captures.rs:12:5: 12:9
49        StorageDead(_11);                // scope 2 at $DIR/inline-closure-captures.rs:12:5: 12:9
50        StorageDead(_10);                // scope 2 at $DIR/inline-closure-captures.rs:12:5: 12:9
51        StorageDead(_9);                 // scope 1 at $DIR/inline-closure-captures.rs:12:5: 12:9
52        StorageDead(_8);                 // scope 1 at $DIR/inline-closure-captures.rs:12:8: 12:9
53        StorageDead(_7);                 // scope 1 at $DIR/inline-closure-captures.rs:12:8: 12:9
54        StorageDead(_6);                 // scope 1 at $DIR/inline-closure-captures.rs:12:8: 12:9
55        StorageDead(_3);                 // scope 0 at $DIR/inline-closure-captures.rs:13:1: 13:2
56        return;                          // scope 0 at $DIR/inline-closure-captures.rs:13:2: 13:2
57    }
58}
59