fork/rust
git clone https://git.julia.blue/fork/rust
49cae55760d
1.44.0
1- // MIR for `foo` before CopyPropagation 2+ // MIR for `foo` after CopyPropagation 3 4 fn foo(_1: u8) -> () { 5 debug x => _1; // in scope 0 at $DIR/copy_propagation_arg.rs:9:8: 9:13 6 let mut _0: (); // return place in scope 0 at $DIR/copy_propagation_arg.rs:9:19: 9:19 7 let mut _2: u8; // in scope 0 at $DIR/copy_propagation_arg.rs:11:9: 11:17 8 let mut _3: u8; // in scope 0 at $DIR/copy_propagation_arg.rs:11:15: 11:16 9 10 bb0: { 11 StorageLive(_2); // bb0[0]: scope 0 at $DIR/copy_propagation_arg.rs:11:9: 11:17 12 StorageLive(_3); // bb0[1]: scope 0 at $DIR/copy_propagation_arg.rs:11:15: 11:16 13 _3 = _1; // bb0[2]: scope 0 at $DIR/copy_propagation_arg.rs:11:15: 11:16 14 _2 = const dummy(move _3) -> bb1; // bb0[3]: scope 0 at $DIR/copy_propagation_arg.rs:11:9: 11:17 15 // ty::Const 16 // + ty: fn(u8) -> u8 {dummy} 17 // + val: Value(Scalar(<ZST>)) 18 // mir::Constant 19 // + span: $DIR/copy_propagation_arg.rs:11:9: 11:14 20 // + literal: Const { ty: fn(u8) -> u8 {dummy}, val: Value(Scalar(<ZST>)) } 21 } 22 23 bb1: { 24 StorageDead(_3); // bb1[0]: scope 0 at $DIR/copy_propagation_arg.rs:11:16: 11:17 25 _1 = move _2; // bb1[1]: scope 0 at $DIR/copy_propagation_arg.rs:11:5: 11:17 26 StorageDead(_2); // bb1[2]: scope 0 at $DIR/copy_propagation_arg.rs:11:16: 11:17 27 _0 = const (); // bb1[3]: scope 0 at $DIR/copy_propagation_arg.rs:9:19: 12:2 28 // ty::Const 29 // + ty: () 30 // + val: Value(Scalar(<ZST>)) 31 // mir::Constant 32 // + span: $DIR/copy_propagation_arg.rs:9:19: 12:2 33 // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) } 34 return; // bb1[4]: scope 0 at $DIR/copy_propagation_arg.rs:12:2: 12:2 35 } 36 } 37