Skip to content

Instantly share code, notes, and snippets.

@jyn514
Created September 5, 2020 22:55
Show Gist options
  • Save jyn514/8cc91dae699c828e7e9164f9de03cd38 to your computer and use it in GitHub Desktop.
Save jyn514/8cc91dae699c828e7e9164f9de03cd38 to your computer and use it in GitHub Desktop.
// WARNING: This output format is intended for human consumers only
// and is subject to change without notice. Knock yourself out.
fn print(_1: &[u8]) -> () {
debug data => _1; // in scope 0 at main.rs:3:10: 3:14
let mut _0: (); // return place in scope 0 at main.rs:3:23: 3:23
let _2: (); // in scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:9: 96:62
let mut _3: std::fmt::Arguments; // in scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:28: 96:61
let mut _4: &[&str]; // in scope 0 at main.rs:4:14: 4:21
let mut _5: &[&str; 2]; // in scope 0 at main.rs:4:14: 4:21
let _6: &[&str; 2]; // in scope 0 at main.rs:4:14: 4:21
let mut _7: &[std::fmt::ArgumentV1]; // in scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:28: 96:61
let mut _8: &[std::fmt::ArgumentV1; 1]; // in scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:28: 96:61
let _9: &[std::fmt::ArgumentV1; 1]; // in scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:28: 96:61
let _10: [std::fmt::ArgumentV1; 1]; // in scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:28: 96:61
let mut _11: (&&[u8],); // in scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:28: 96:61
let mut _12: &&[u8]; // in scope 0 at main.rs:4:23: 4:27
let _13: &&[u8]; // in scope 0 at main.rs:4:23: 4:27
let mut _14: std::fmt::ArgumentV1; // in scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:28: 96:61
let mut _15: &&[u8]; // in scope 0 at main.rs:4:23: 4:27
let mut _16: for<'r, 's, 't0> fn(&'r &[u8], &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>; // in scope 0 at main.rs:4:23: 4:27
let mut _17: &[std::fmt::rt::v1::Argument]; // in scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:28: 96:61
let mut _18: &[std::fmt::rt::v1::Argument; 1]; // in scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:28: 96:61
let _19: &[std::fmt::rt::v1::Argument; 1]; // in scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:28: 96:61
let mut _20: &[std::fmt::rt::v1::Argument; 1]; // in scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:28: 96:61
let mut _21: &[&str; 2]; // in scope 0 at main.rs:4:14: 4:21
scope 1 {
debug arg0 => _13; // in scope 1 at main.rs:4:23: 4:27
}
bb0: {
StorageLive(_2); // scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:9: 96:62
StorageLive(_3); // scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:28: 96:61
StorageLive(_4); // scope 0 at main.rs:4:14: 4:21
StorageLive(_5); // scope 0 at main.rs:4:14: 4:21
StorageLive(_6); // scope 0 at main.rs:4:14: 4:21
_21 = const print::promoted[1]; // scope 0 at main.rs:4:14: 4:21
// ty::Const
// + ty: &[&str; 2]
// + val: Unevaluated(WithOptConstParam { did: DefId(0:4 ~ test[8ae6]::print[0]), const_param_did: None }, [], Some(promoted[1]))
// mir::Constant
// + span: main.rs:4:14: 4:21
// + literal: Const { ty: &[&str; 2], val: Unevaluated(WithOptConstParam { did: DefId(0:4 ~ test[8ae6]::print[0]), const_param_did: None }, [], Some(promoted[1])) }
_6 = _21; // scope 0 at main.rs:4:14: 4:21
_5 = _6; // scope 0 at main.rs:4:14: 4:21
_4 = move _5 as &[&str] (Pointer(Unsize)); // scope 0 at main.rs:4:14: 4:21
StorageDead(_5); // scope 0 at main.rs:4:20: 4:21
StorageLive(_7); // scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:28: 96:61
StorageLive(_8); // scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:28: 96:61
StorageLive(_9); // scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:28: 96:61
StorageLive(_10); // scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:28: 96:61
StorageLive(_11); // scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:28: 96:61
StorageLive(_12); // scope 0 at main.rs:4:23: 4:27
_12 = &_1; // scope 0 at main.rs:4:23: 4:27
(_11.0: &&[u8]) = move _12; // scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:28: 96:61
StorageDead(_12); // scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:60: 96:61
StorageLive(_13); // scope 0 at main.rs:4:23: 4:27
_13 = (_11.0: &&[u8]); // scope 0 at main.rs:4:23: 4:27
StorageLive(_14); // scope 1 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:28: 96:61
StorageLive(_15); // scope 1 at main.rs:4:23: 4:27
_15 = _13; // scope 1 at main.rs:4:23: 4:27
StorageLive(_16); // scope 1 at main.rs:4:23: 4:27
_16 = <&[u8] as std::fmt::Debug>::fmt as for<'r, 's, 't0> fn(&'r &[u8], &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer)); // scope 1 at main.rs:4:23: 4:27
// mir::Constant
// + span: main.rs:4:23: 4:27
// + literal: Const { ty: for<'r, 's, 't0> fn(&'r &[u8], &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> {<&[u8] as std::fmt::Debug>::fmt}, val: Value(Scalar(<ZST>)) }
_14 = std::fmt::ArgumentV1::new::<&[u8]>(move _15, move _16) -> bb1; // scope 1 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:28: 96:61
// mir::Constant
// + span: /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:28: 96:61
// + user_ty: UserType(1)
// + literal: Const { ty: for<'b> fn(&'b &[u8], for<'r, 's, 't0> fn(&'r &[u8], &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>) -> std::fmt::ArgumentV1<'b> {std::fmt::ArgumentV1::new::<&[u8]>}, val: Value(Scalar(<ZST>)) }
}
bb1: {
StorageDead(_16); // scope 1 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:60: 96:61
StorageDead(_15); // scope 1 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:60: 96:61
_10 = [move _14]; // scope 1 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:28: 96:61
StorageDead(_14); // scope 1 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:60: 96:61
StorageDead(_13); // scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:60: 96:61
_9 = &_10; // scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:28: 96:61
_8 = _9; // scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:28: 96:61
_7 = move _8 as &[std::fmt::ArgumentV1] (Pointer(Unsize)); // scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:28: 96:61
StorageDead(_8); // scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:60: 96:61
StorageLive(_17); // scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:28: 96:61
StorageLive(_18); // scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:28: 96:61
StorageLive(_19); // scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:28: 96:61
_20 = const print::promoted[0]; // scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:28: 96:61
// ty::Const
// + ty: &[std::fmt::rt::v1::Argument; 1]
// + val: Unevaluated(WithOptConstParam { did: DefId(0:4 ~ test[8ae6]::print[0]), const_param_did: None }, [], Some(promoted[0]))
// mir::Constant
// + span: /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:28: 96:61
// + literal: Const { ty: &[std::fmt::rt::v1::Argument; 1], val: Unevaluated(WithOptConstParam { did: DefId(0:4 ~ test[8ae6]::print[0]), const_param_did: None }, [], Some(promoted[0])) }
_19 = _20; // scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:28: 96:61
_18 = _19; // scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:28: 96:61
_17 = move _18 as &[std::fmt::rt::v1::Argument] (Pointer(Unsize)); // scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:28: 96:61
StorageDead(_18); // scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:60: 96:61
_3 = std::fmt::Arguments::new_v1_formatted(move _4, move _7, move _17) -> bb2; // scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:28: 96:61
// mir::Constant
// + span: /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:28: 96:61
// + user_ty: UserType(0)
// + literal: Const { ty: fn(&[&'static str], &[std::fmt::ArgumentV1], &[std::fmt::rt::v1::Argument]) -> std::fmt::Arguments {std::fmt::Arguments::new_v1_formatted}, val: Value(Scalar(<ZST>)) }
}
bb2: {
StorageDead(_17); // scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:60: 96:61
StorageDead(_7); // scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:60: 96:61
StorageDead(_4); // scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:60: 96:61
_2 = std::io::_print(move _3) -> bb3; // scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:9: 96:62
// mir::Constant
// + span: /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:9: 96:27
// + literal: Const { ty: for<'r> fn(std::fmt::Arguments<'r>) {std::io::_print}, val: Value(Scalar(<ZST>)) }
}
bb3: {
StorageDead(_3); // scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:61: 96:62
StorageDead(_19); // scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:62: 96:63
StorageDead(_11); // scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:62: 96:63
StorageDead(_10); // scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:62: 96:63
StorageDead(_9); // scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:62: 96:63
StorageDead(_6); // scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:62: 96:63
StorageDead(_2); // scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:62: 96:63
_0 = const (); // scope 0 at main.rs:3:23: 5:2
return; // scope 0 at main.rs:5:2: 5:2
}
}
promoted[0] in print: &[std::fmt::rt::v1::Argument; 1] = {
let mut _0: &[std::fmt::rt::v1::Argument; 1]; // return place in scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:28: 96:61
let mut _1: [std::fmt::rt::v1::Argument; 1]; // in scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:28: 96:61
let mut _2: std::fmt::rt::v1::Argument; // in scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:28: 96:61
let mut _3: std::fmt::rt::v1::FormatSpec; // in scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:28: 96:61
let mut _4: std::fmt::rt::v1::Alignment; // in scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:28: 96:61
let mut _5: std::fmt::rt::v1::Count; // in scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:28: 96:61
let mut _6: std::fmt::rt::v1::Count; // in scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:28: 96:61
scope 1 {
}
bb0: {
discriminant(_4) = 3; // scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:28: 96:61
discriminant(_5) = 2; // scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:28: 96:61
discriminant(_6) = 2; // scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:28: 96:61
(_3.0: char) = const ' '; // scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:28: 96:61
(_3.1: std::fmt::rt::v1::Alignment) = move _4; // scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:28: 96:61
(_3.2: u32) = const 4_u32; // scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:28: 96:61
(_3.3: std::fmt::rt::v1::Count) = move _5; // scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:28: 96:61
(_3.4: std::fmt::rt::v1::Count) = move _6; // scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:28: 96:61
(_2.0: usize) = const 0_usize; // scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:28: 96:61
(_2.1: std::fmt::rt::v1::FormatSpec) = move _3; // scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:28: 96:61
_1 = [move _2]; // scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:28: 96:61
_0 = &_1; // scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:28: 96:61
return; // scope 0 at /rustc/2d8a3b9181f41d3af9b9f016c5d73b2553e344bf/library/std/src/macros.rs:96:28: 96:61
}
}
promoted[1] in print: &[&str; 2] = {
let mut _0: &[&str; 2]; // return place in scope 0 at main.rs:4:14: 4:21
let mut _1: [&str; 2]; // in scope 0 at main.rs:4:14: 4:21
scope 1 {
}
bb0: {
_1 = [const "", const "\n"]; // scope 0 at main.rs:4:14: 4:21
// ty::Const
// + ty: &str
// + val: Value(Slice { data: Allocation { bytes: [], relocations: Relocations(SortedMap { data: [] }), init_mask: InitMask { blocks: [], len: Size { raw: 0 } }, size: Size { raw: 0 }, align: Align { pow2: 0 }, mutability: Not, extra: () }, start: 0, end: 0 })
// mir::Constant
// + span: main.rs:4:14: 4:21
// + literal: Const { ty: &str, val: Value(Slice { data: Allocation { bytes: [], relocations: Relocations(SortedMap { data: [] }), init_mask: InitMask { blocks: [], len: Size { raw: 0 } }, size: Size { raw: 0 }, align: Align { pow2: 0 }, mutability: Not, extra: () }, start: 0, end: 0 }) }
// ty::Const
// + ty: &str
// + val: Value(Slice { data: Allocation { bytes: [10], relocations: Relocations(SortedMap { data: [] }), init_mask: InitMask { blocks: [1], len: Size { raw: 1 } }, size: Size { raw: 1 }, align: Align { pow2: 0 }, mutability: Not, extra: () }, start: 0, end: 1 })
// mir::Constant
// + span: main.rs:4:14: 4:21
// + literal: Const { ty: &str, val: Value(Slice { data: Allocation { bytes: [10], relocations: Relocations(SortedMap { data: [] }), init_mask: InitMask { blocks: [1], len: Size { raw: 1 } }, size: Size { raw: 1 }, align: Align { pow2: 0 }, mutability: Not, extra: () }, start: 0, end: 1 }) }
_0 = &_1; // scope 0 at main.rs:4:14: 4:21
return; // scope 0 at main.rs:4:14: 4:21
}
}
fn main() -> () {
let mut _0: (); // return place in scope 0 at main.rs:7:11: 7:11
let _1: fat_ptr::FatPtr; // in scope 0 at main.rs:8:9: 8:12
let mut _3: *const u8; // in scope 0 at main.rs:9:52: 9:64
let mut _4: &[u8]; // in scope 0 at main.rs:9:52: 9:55
let _5: &[u8]; // in scope 0 at main.rs:9:52: 9:55
let mut _6: &fat_ptr::FatPtr; // in scope 0 at main.rs:9:52: 9:55
let mut _7: usize; // in scope 0 at main.rs:9:66: 9:75
let mut _8: &[u8]; // in scope 0 at main.rs:9:66: 9:69
let _9: &[u8]; // in scope 0 at main.rs:9:66: 9:69
let mut _10: &fat_ptr::FatPtr; // in scope 0 at main.rs:9:66: 9:69
let _11: (); // in scope 0 at main.rs:11:5: 11:16
let mut _12: &[u8]; // in scope 0 at main.rs:11:11: 11:15
scope 1 {
debug ptr => _1; // in scope 1 at main.rs:8:9: 8:12
let _2: &[u8]; // in scope 1 at main.rs:9:9: 9:13
scope 2 {
debug data => _2; // in scope 2 at main.rs:9:9: 9:13
}
scope 3 {
}
}
bb0: {
StorageLive(_1); // scope 0 at main.rs:8:9: 8:12
_1 = fat_ptr::FatPtr::new(const 20_usize) -> bb2; // scope 0 at main.rs:8:15: 8:30
// mir::Constant
// + span: main.rs:8:15: 8:26
// + literal: Const { ty: fn(usize) -> fat_ptr::FatPtr {fat_ptr::FatPtr::new}, val: Value(Scalar(<ZST>)) }
}
bb1 (cleanup): {
resume; // scope 0 at main.rs:7:1: 12:2
}
bb2: {
StorageLive(_2); // scope 1 at main.rs:9:9: 9:13
StorageLive(_3); // scope 3 at main.rs:9:52: 9:64
StorageLive(_4); // scope 3 at main.rs:9:52: 9:55
StorageLive(_5); // scope 3 at main.rs:9:52: 9:55
StorageLive(_6); // scope 3 at main.rs:9:52: 9:55
_6 = &_1; // scope 3 at main.rs:9:52: 9:55
_5 = <fat_ptr::FatPtr as std::ops::Deref>::deref(move _6) -> [return: bb3, unwind: bb4]; // scope 3 at main.rs:9:52: 9:55
// mir::Constant
// + span: main.rs:9:52: 9:55
// + literal: Const { ty: for<'r> fn(&'r fat_ptr::FatPtr) -> &'r <fat_ptr::FatPtr as std::ops::Deref>::Target {<fat_ptr::FatPtr as std::ops::Deref>::deref}, val: Value(Scalar(<ZST>)) }
}
bb3: {
_4 = _5; // scope 3 at main.rs:9:52: 9:55
StorageDead(_6); // scope 3 at main.rs:9:54: 9:55
_3 = core::slice::<impl [u8]>::as_ptr(move _4) -> [return: bb5, unwind: bb4]; // scope 3 at main.rs:9:52: 9:64
// mir::Constant
// + span: main.rs:9:56: 9:62
// + literal: Const { ty: for<'r> fn(&'r [u8]) -> *const u8 {core::slice::<impl [u8]>::as_ptr}, val: Value(Scalar(<ZST>)) }
}
bb4 (cleanup): {
drop(_1) -> bb1; // scope 0 at main.rs:12:1: 12:2
}
bb5: {
StorageDead(_4); // scope 3 at main.rs:9:63: 9:64
StorageLive(_7); // scope 3 at main.rs:9:66: 9:75
StorageLive(_8); // scope 3 at main.rs:9:66: 9:69
StorageLive(_9); // scope 3 at main.rs:9:66: 9:69
StorageLive(_10); // scope 3 at main.rs:9:66: 9:69
_10 = &_1; // scope 3 at main.rs:9:66: 9:69
_9 = <fat_ptr::FatPtr as std::ops::Deref>::deref(move _10) -> [return: bb6, unwind: bb4]; // scope 3 at main.rs:9:66: 9:69
// mir::Constant
// + span: main.rs:9:66: 9:69
// + literal: Const { ty: for<'r> fn(&'r fat_ptr::FatPtr) -> &'r <fat_ptr::FatPtr as std::ops::Deref>::Target {<fat_ptr::FatPtr as std::ops::Deref>::deref}, val: Value(Scalar(<ZST>)) }
}
bb6: {
_8 = _9; // scope 3 at main.rs:9:66: 9:69
StorageDead(_10); // scope 3 at main.rs:9:68: 9:69
_7 = core::slice::<impl [u8]>::len(move _8) -> [return: bb7, unwind: bb4]; // scope 3 at main.rs:9:66: 9:75
// mir::Constant
// + span: main.rs:9:70: 9:73
// + literal: Const { ty: for<'r> fn(&'r [u8]) -> usize {core::slice::<impl [u8]>::len}, val: Value(Scalar(<ZST>)) }
}
bb7: {
StorageDead(_8); // scope 3 at main.rs:9:74: 9:75
_2 = std::slice::from_raw_parts::<u8>(move _3, move _7) -> [return: bb8, unwind: bb4]; // scope 3 at main.rs:9:25: 9:76
// mir::Constant
// + span: main.rs:9:25: 9:51
// + literal: Const { ty: unsafe fn(*const u8, usize) -> &[u8] {std::slice::from_raw_parts::<u8>}, val: Value(Scalar(<ZST>)) }
}
bb8: {
StorageDead(_7); // scope 3 at main.rs:9:75: 9:76
StorageDead(_3); // scope 3 at main.rs:9:75: 9:76
StorageDead(_9); // scope 1 at main.rs:9:78: 9:79
StorageDead(_5); // scope 1 at main.rs:9:78: 9:79
StorageLive(_11); // scope 2 at main.rs:11:5: 11:16
StorageLive(_12); // scope 2 at main.rs:11:11: 11:15
_12 = _2; // scope 2 at main.rs:11:11: 11:15
_11 = print(move _12) -> [return: bb9, unwind: bb4]; // scope 2 at main.rs:11:5: 11:16
// mir::Constant
// + span: main.rs:11:5: 11:10
// + literal: Const { ty: for<'r> fn(&'r [u8]) {print}, val: Value(Scalar(<ZST>)) }
}
bb9: {
StorageDead(_12); // scope 2 at main.rs:11:15: 11:16
StorageDead(_11); // scope 2 at main.rs:11:16: 11:17
_0 = const (); // scope 0 at main.rs:7:11: 12:2
StorageDead(_2); // scope 1 at main.rs:12:1: 12:2
drop(_1) -> bb10; // scope 0 at main.rs:12:1: 12:2
}
bb10: {
StorageDead(_1); // scope 0 at main.rs:12:1: 12:2
return; // scope 0 at main.rs:12:2: 12:2
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment