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
struct Foo { | |
a: Box<u32>, | |
b: Box<u32>, | |
c: Box<u32>, | |
d: Box<u32> | |
} | |
fn star() -> u32 { 0 } | |
fn main() { |
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
; ModuleID = 'example.0.rs' | |
target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128" | |
target triple = "x86_64-pc-windows-msvc" | |
%"2.std::str::Chars" = type { %"2.std::slice::Iter<u8>" } | |
%"2.std::slice::Iter<u8>" = type { i8*, i8*, %"2.std::marker::PhantomData<&'static u8>" } | |
%"2.std::marker::PhantomData<&'static u8>" = type {} | |
%"2.std::option::Option<char>" = type { i32, [0 x i32], [1 x i32] } | |
%"2.std::option::Option<u32>" = type { i32, [0 x i32], [1 x i32] } |
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
let var0: usize; | |
let var1: Box<i32>; | |
let var2: i32; | |
let mut tmp0: (); | |
let mut tmp1: i32; | |
start: | |
var0 = const 100usize; | |
var1 = Box::new(const 1000i32) unwind uw0; | |
tmp1 = (*var1); |
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
pub struct Receiver(u32); | |
impl Drop for Receiver { | |
fn drop(&mut self) {} | |
} | |
pub fn recv(f1: bool, f2: bool) { | |
match f1 { | |
false => Receiver(0), | |
true => { | |
match f2 { |
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
#[repr(result)] | |
enum Result<O,E> { | |
Ok(O), | |
Err(E) | |
} | |
fn foo() -> Result<Dest, Error> { | |
let result = make_result(); | |
match result.set_up() { | |
Ok(()) => {}, |
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
; ModuleID = 'test.cgu-0.rs' | |
source_filename = "test.cgu-0.rs" | |
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" | |
target triple = "x86_64-unknown-linux-gnu" | |
; Function Attrs: readonly uwtable | |
define i32 @dot_ref_s(i32** noalias nocapture readonly dereferenceable(8)) { | |
entry-block: | |
%loadedptr = load i32*, i32** %0, align 8, !nonnull !0 | |
%ptrtoint = ptrtoint i32* %loadedptr to i64 |
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
*** IR Dump Before Module Verifier *** | |
; Function Attrs: uwtable | |
define i64 @_ZN9serialize6leb12819write_signed_leb12817h02e4c1e084b3f592E(%"collections::vec::Vec<u8>"* nocapture dereferenceable(24), i64, i128) unnamed_addr #1 personality i32 (i32, i32, i64, %"unwind::libunwind::_Unwind_Exception"*, %"unwind::libunwind::_Unwind_Context"*)* @rust_eh_personality { | |
entry-block: | |
br label %bb3.i | |
bb3.i: ; preds = %"_ZN9serialize6leb12819write_signed_leb12828_$u7b$$u7b$closure$u7d$$u7d$17h46483652043636f9E.exit.i", %entry-block | |
%position.0.i = phi i64 [ 0, %entry-block ], [ %26, %"_ZN9serialize6leb12819write_signed_leb12828_$u7b$$u7b$closure$u7d$$u7d$17h46483652043636f9E.exit.i" ] | |
%value.0.i = phi i128 [ %2, %entry-block ], [ %5, %"_ZN9serialize6leb12819write_signed_leb12828_$u7b$$u7b$closure$u7d$$u7d$17h46483652043636f9E.exit.i" ] | |
%3 = trunc i128 %value.0.i to i8 |
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
0000000000000000 <_ZN96_$LT$core..fmt..Write..write_fmt..Adapter$LT$$u27$a$C$$u20$T$GT$$u20$as$u20$core..fmt..Write$GT$9write_str17h418125c1430c20aaE>: | |
0: 55 push %rbp | |
1: 48 89 e5 mov %rsp,%rbp | |
4: 41 57 push %r15 | |
6: 41 56 push %r14 | |
8: 53 push %rbx | |
9: 50 push %rax | |
a: 49 89 d7 mov %rdx,%r15 | |
d: 49 89 f6 mov %rsi,%r14 | |
10: 48 8b 1f mov (%rdi),%rbx |
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
; ModuleID = 'slo.rs' | |
source_filename = "slo.rs" | |
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" | |
target triple = "x86_64-unknown-linux-gnu" | |
%"collections::vec::Vec<u8>" = type { %"alloc::raw_vec::RawVec<u8>", [0 x i8], i64, [0 x i8] } | |
%"alloc::raw_vec::RawVec<u8>" = type { %"core::ptr::Unique<u8>", [0 x i8], i64, [0 x i8] } | |
%"core::ptr::Unique<u8>" = type { %"core::nonzero::NonZero<*const u8>", [0 x i8], %"core::marker::PhantomData<u8>", [0 x i8] } | |
%"core::nonzero::NonZero<*const u8>" = type { i8*, [0 x i8] } | |
%"core::marker::PhantomData<u8>" = type {} |
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
struct Foo {} | |
let foo: Foo; | |
let a: &'a mut &'aa mut Foo; | |
let b: &'b mut &'bb mut Foo; | |
let c: &'c mut &'cc mut Foo; | |
block START { | |
goto X; | |
} |