]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/inline/dyn_trait.get_query.Inline.diff
7b306dd9482cafe76eea4b542805e671498bb8cb
[rust.git] / src / test / mir-opt / inline / dyn_trait.get_query.Inline.diff
1 - // MIR for `get_query` before Inline
2 + // MIR for `get_query` after Inline
3   
4   fn get_query(_1: &T) -> () {
5       debug t => _1;                       // in scope 0 at $DIR/dyn-trait.rs:32:31: 32:32
6       let mut _0: ();                      // return place in scope 0 at $DIR/dyn-trait.rs:32:38: 32:38
7       let _2: &<Q as Query>::C;            // in scope 0 at $DIR/dyn-trait.rs:33:9: 33:10
8       let mut _3: &T;                      // in scope 0 at $DIR/dyn-trait.rs:33:22: 33:23
9       let mut _4: &<Q as Query>::C;        // in scope 0 at $DIR/dyn-trait.rs:34:23: 34:24
10       scope 1 {
11           debug c => _2;                   // in scope 1 at $DIR/dyn-trait.rs:33:9: 33:10
12 +         scope 2 (inlined try_execute_query::<<Q as Query>::C>) { // at $DIR/dyn-trait.rs:34:5: 34:25
13 +             debug c => _4;               // in scope 2 at $DIR/dyn-trait.rs:26:36: 26:37
14 +             let mut _5: &dyn Cache<V = <Q as Query>::V>; // in scope 2 at $DIR/dyn-trait.rs:27:14: 27:15
15 +             let mut _6: &<Q as Query>::C; // in scope 2 at $DIR/dyn-trait.rs:27:14: 27:15
16 +             scope 3 (inlined mk_cycle::<<Q as Query>::V>) { // at $DIR/dyn-trait.rs:27:5: 27:16
17 +                 debug c => _5;           // in scope 3 at $DIR/dyn-trait.rs:20:27: 20:28
18 +                 let mut _7: &dyn Cache<V = <Q as Query>::V>; // in scope 3 at $DIR/dyn-trait.rs:21:5: 21:22
19 +             }
20 +         }
21       }
22   
23       bb0: {
24           StorageLive(_2);                 // scope 0 at $DIR/dyn-trait.rs:33:9: 33:10
25           StorageLive(_3);                 // scope 0 at $DIR/dyn-trait.rs:33:22: 33:23
26           _3 = &(*_1);                     // scope 0 at $DIR/dyn-trait.rs:33:22: 33:23
27           _2 = <Q as Query>::cache::<T>(move _3) -> bb1; // scope 0 at $DIR/dyn-trait.rs:33:13: 33:24
28                                            // mir::Constant
29                                            // + span: $DIR/dyn-trait.rs:33:13: 33:21
30                                            // + user_ty: UserType(0)
31                                            // + literal: Const { ty: for<'r> fn(&'r T) -> &'r <Q as Query>::C {<Q as Query>::cache::<T>}, val: Value(<ZST>) }
32       }
33   
34       bb1: {
35           StorageDead(_3);                 // scope 0 at $DIR/dyn-trait.rs:33:23: 33:24
36           StorageLive(_4);                 // scope 1 at $DIR/dyn-trait.rs:34:23: 34:24
37           _4 = &(*_2);                     // scope 1 at $DIR/dyn-trait.rs:34:23: 34:24
38 -         _0 = try_execute_query::<<Q as Query>::C>(move _4) -> bb2; // scope 1 at $DIR/dyn-trait.rs:34:5: 34:25
39 +         StorageLive(_5);                 // scope 2 at $DIR/dyn-trait.rs:27:14: 27:15
40 +         StorageLive(_6);                 // scope 2 at $DIR/dyn-trait.rs:27:14: 27:15
41 +         _6 = _4;                         // scope 2 at $DIR/dyn-trait.rs:27:14: 27:15
42 +         _5 = move _6 as &dyn Cache<V = <Q as Query>::V> (Pointer(Unsize)); // scope 2 at $DIR/dyn-trait.rs:27:14: 27:15
43 +         StorageDead(_6);                 // scope 2 at $DIR/dyn-trait.rs:27:14: 27:15
44 +         StorageLive(_7);                 // scope 3 at $DIR/dyn-trait.rs:21:5: 21:22
45 +         _7 = _5;                         // scope 3 at $DIR/dyn-trait.rs:21:5: 21:22
46 +         _0 = <dyn Cache<V = <Q as Query>::V> as Cache>::store_nocache(move _7) -> bb2; // scope 3 at $DIR/dyn-trait.rs:21:5: 21:22
47                                            // mir::Constant
48 -                                          // + span: $DIR/dyn-trait.rs:34:5: 34:22
49 -                                          // + literal: Const { ty: for<'r> fn(&'r <Q as Query>::C) {try_execute_query::<<Q as Query>::C>}, val: Value(<ZST>) }
50 +                                          // + span: $DIR/dyn-trait.rs:21:7: 21:20
51 +                                          // + literal: Const { ty: for<'r> fn(&'r dyn Cache<V = <Q as Query>::V>) {<dyn Cache<V = <Q as Query>::V> as Cache>::store_nocache}, val: Value(<ZST>) }
52       }
53   
54       bb2: {
55 +         StorageDead(_7);                 // scope 3 at $DIR/dyn-trait.rs:21:21: 21:22
56 +         StorageDead(_5);                 // scope 2 at $DIR/dyn-trait.rs:27:15: 27:16
57           StorageDead(_4);                 // scope 1 at $DIR/dyn-trait.rs:34:24: 34:25
58           StorageDead(_2);                 // scope 0 at $DIR/dyn-trait.rs:35:1: 35:2
59           return;                          // scope 0 at $DIR/dyn-trait.rs:35:2: 35:2
60 +     }
61
62 +     bb3 (cleanup): {
63 +         resume;                          // scope 0 at $DIR/dyn-trait.rs:32:1: 35:2
64       }
65   }
66