Last active
April 10, 2020 20:50
-
-
Save jonas-schievink/6be82985b216f4fa76df43fa890df0f1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// MIR for `basics` after Nrvo | |
fn basics(_1: (f32,)) -> f32 { | |
let mut _0: f32; // return place in scope 0 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:11:34: 11:37 | |
let _2: f32; // in scope 0 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:11:18: 11:19 | |
let mut _4: f32; // in scope 0 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:14:9: 14:10 | |
let mut _6: f32; // in scope 0 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:17:18: 17:19 | |
let mut _8: f32; // in scope 0 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:20:22: 20:23 | |
let mut _9: f32; // in scope 0 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:21:9: 21:10 | |
scope 1 { | |
debug a => _2; // in scope 1 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:11:18: 11:19 | |
let _3: f32 as UserTypeProjection { base: UserType(0), projs: [] }; // in scope 1 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:13:9: 13:10 | |
scope 2 { | |
debug b => _3; // in scope 2 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:13:9: 13:10 | |
let _5: f32 as UserTypeProjection { base: UserType(2), projs: [] }; // in scope 2 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:17:9: 17:10 | |
scope 3 { | |
debug c => _5; // in scope 3 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:17:9: 17:10 | |
let mut _7: f32 as UserTypeProjection { base: UserType(4), projs: [] }; // in scope 3 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:20:9: 20:14 | |
scope 4 { | |
debug d => _7; // in scope 4 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:20:9: 20:14 | |
} | |
} | |
} | |
} | |
bb0: { | |
nop; // bb0[0]: scope 0 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:11:18: 11:19 | |
_2 = (_1.0: f32); // bb0[1]: scope 0 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:11:18: 11:19 | |
nop; // bb0[2]: scope 1 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:13:9: 13:10 | |
nop; // bb0[3]: scope 2 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:14:9: 14:10 | |
nop; // bb0[4]: scope 2 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:14:9: 14:10 | |
_3 = Add(move _2, const 1f32); // bb0[5]: scope 2 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:14:5: 14:16 | |
// ty::Const | |
// + ty: f32 | |
// + val: Value(Scalar(0x3f800000)) | |
// mir::Constant | |
// + span: /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:14:13: 14:16 | |
// + literal: Const { ty: f32, val: Value(Scalar(0x3f800000)) } | |
nop; // bb0[6]: scope 2 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:14:15: 14:16 | |
nop; // bb0[7]: scope 2 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:17:9: 17:10 | |
nop; // bb0[8]: scope 2 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:17:18: 17:19 | |
nop; // bb0[9]: scope 2 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:17:18: 17:19 | |
_5 = Add(move _3, const 1f32); // bb0[10]: scope 2 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:17:18: 17:25 | |
// ty::Const | |
// + ty: f32 | |
// + val: Value(Scalar(0x3f800000)) | |
// mir::Constant | |
// + span: /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:17:22: 17:25 | |
// + literal: Const { ty: f32, val: Value(Scalar(0x3f800000)) } | |
nop; // bb0[11]: scope 2 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:17:24: 17:25 | |
nop; // bb0[12]: scope 3 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:20:9: 20:14 | |
nop; // bb0[13]: scope 3 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:20:22: 20:23 | |
nop; // bb0[14]: scope 3 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:20:22: 20:23 | |
_0 = Add(move _5, const 1f32); // bb0[15]: scope 3 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:20:22: 20:29 | |
// ty::Const | |
// + ty: f32 | |
// + val: Value(Scalar(0x3f800000)) | |
// mir::Constant | |
// + span: /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:20:26: 20:29 | |
// + literal: Const { ty: f32, val: Value(Scalar(0x3f800000)) } | |
nop; // bb0[16]: scope 3 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:20:28: 20:29 | |
StorageLive(_9); // bb0[17]: scope 4 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:21:9: 21:10 | |
_9 = _0; // bb0[18]: scope 4 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:21:9: 21:10 | |
_0 = Add(move _9, const 1f32); // bb0[19]: scope 4 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:21:5: 21:16 | |
// ty::Const | |
// + ty: f32 | |
// + val: Value(Scalar(0x3f800000)) | |
// mir::Constant | |
// + span: /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:21:13: 21:16 | |
// + literal: Const { ty: f32, val: Value(Scalar(0x3f800000)) } | |
StorageDead(_9); // bb0[20]: scope 4 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:21:15: 21:16 | |
nop; // bb0[21]: scope 4 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:24:5: 24:6 | |
nop; // bb0[22]: scope 3 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:25:1: 25:2 | |
nop; // bb0[23]: scope 2 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:25:1: 25:2 | |
nop; // bb0[24]: scope 1 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:25:1: 25:2 | |
nop; // bb0[25]: scope 0 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:25:1: 25:2 | |
return; // bb0[26]: scope 0 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:25:2: 25:2 | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// MIR for `basics` before Nrvo | |
fn basics(_1: (f32,)) -> f32 { | |
let mut _0: f32; // return place in scope 0 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:11:34: 11:37 | |
let _2: f32; // in scope 0 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:11:18: 11:19 | |
let mut _4: f32; // in scope 0 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:14:9: 14:10 | |
let mut _6: f32; // in scope 0 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:17:18: 17:19 | |
let mut _8: f32; // in scope 0 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:20:22: 20:23 | |
let mut _9: f32; // in scope 0 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:21:9: 21:10 | |
scope 1 { | |
debug a => _2; // in scope 1 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:11:18: 11:19 | |
let _3: f32 as UserTypeProjection { base: UserType(0), projs: [] }; // in scope 1 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:13:9: 13:10 | |
scope 2 { | |
debug b => _3; // in scope 2 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:13:9: 13:10 | |
let _5: f32 as UserTypeProjection { base: UserType(2), projs: [] }; // in scope 2 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:17:9: 17:10 | |
scope 3 { | |
debug c => _5; // in scope 3 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:17:9: 17:10 | |
let mut _7: f32 as UserTypeProjection { base: UserType(4), projs: [] }; // in scope 3 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:20:9: 20:14 | |
scope 4 { | |
debug d => _7; // in scope 4 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:20:9: 20:14 | |
} | |
} | |
} | |
} | |
bb0: { | |
StorageLive(_2); // bb0[0]: scope 0 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:11:18: 11:19 | |
_2 = (_1.0: f32); // bb0[1]: scope 0 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:11:18: 11:19 | |
StorageLive(_3); // bb0[2]: scope 1 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:13:9: 13:10 | |
StorageLive(_4); // bb0[3]: scope 2 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:14:9: 14:10 | |
_4 = _2; // bb0[4]: scope 2 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:14:9: 14:10 | |
_3 = Add(move _4, const 1f32); // bb0[5]: scope 2 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:14:5: 14:16 | |
// ty::Const | |
// + ty: f32 | |
// + val: Value(Scalar(0x3f800000)) | |
// mir::Constant | |
// + span: /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:14:13: 14:16 | |
// + literal: Const { ty: f32, val: Value(Scalar(0x3f800000)) } | |
StorageDead(_4); // bb0[6]: scope 2 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:14:15: 14:16 | |
StorageLive(_5); // bb0[7]: scope 2 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:17:9: 17:10 | |
StorageLive(_6); // bb0[8]: scope 2 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:17:18: 17:19 | |
_6 = _3; // bb0[9]: scope 2 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:17:18: 17:19 | |
_5 = Add(move _6, const 1f32); // bb0[10]: scope 2 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:17:18: 17:25 | |
// ty::Const | |
// + ty: f32 | |
// + val: Value(Scalar(0x3f800000)) | |
// mir::Constant | |
// + span: /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:17:22: 17:25 | |
// + literal: Const { ty: f32, val: Value(Scalar(0x3f800000)) } | |
StorageDead(_6); // bb0[11]: scope 2 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:17:24: 17:25 | |
StorageLive(_7); // bb0[12]: scope 3 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:20:9: 20:14 | |
StorageLive(_8); // bb0[13]: scope 3 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:20:22: 20:23 | |
_8 = _5; // bb0[14]: scope 3 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:20:22: 20:23 | |
_7 = Add(move _8, const 1f32); // bb0[15]: scope 3 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:20:22: 20:29 | |
// ty::Const | |
// + ty: f32 | |
// + val: Value(Scalar(0x3f800000)) | |
// mir::Constant | |
// + span: /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:20:26: 20:29 | |
// + literal: Const { ty: f32, val: Value(Scalar(0x3f800000)) } | |
StorageDead(_8); // bb0[16]: scope 3 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:20:28: 20:29 | |
StorageLive(_9); // bb0[17]: scope 4 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:21:9: 21:10 | |
_9 = _7; // bb0[18]: scope 4 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:21:9: 21:10 | |
_7 = Add(move _9, const 1f32); // bb0[19]: scope 4 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:21:5: 21:16 | |
// ty::Const | |
// + ty: f32 | |
// + val: Value(Scalar(0x3f800000)) | |
// mir::Constant | |
// + span: /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:21:13: 21:16 | |
// + literal: Const { ty: f32, val: Value(Scalar(0x3f800000)) } | |
StorageDead(_9); // bb0[20]: scope 4 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:21:15: 21:16 | |
_0 = _7; // bb0[21]: scope 4 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:24:5: 24:6 | |
StorageDead(_7); // bb0[22]: scope 3 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:25:1: 25:2 | |
StorageDead(_5); // bb0[23]: scope 2 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:25:1: 25:2 | |
StorageDead(_3); // bb0[24]: scope 1 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:25:1: 25:2 | |
StorageDead(_2); // bb0[25]: scope 0 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:25:1: 25:2 | |
return; // bb0[26]: scope 0 at /home/jonas/dev/rust/src/test/ui/consts/const_let_eq_float.rs:25:2: 25:2 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment