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
#include <stdio.h> | |
#include <stdbool.h> | |
#include <assert.h> | |
enum ResultKind { Kind_Ok, Kind_Err }; | |
typedef struct { | |
enum ResultKind kind; | |
union { | |
struct { int 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
use std::env; | |
fn main() { | |
env::set_var("RUST_BACKTRACE", "1"); | |
panic!(); | |
} |
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
2,3c2,3 | |
< .file "fulliter.0.rs" | |
< .section .text._ZN4main20h34b4fa9d2be136ebeaaE,"ax",@progbits | |
--- | |
> .file "while.0.rs" | |
> .section .text._ZN4main20h3118530cba082203eaaE,"ax",@progbits | |
5,6c5,6 | |
< .type _ZN4main20h34b4fa9d2be136ebeaaE,@function | |
< _ZN4main20h34b4fa9d2be136ebeaaE: | |
--- |
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
extern crate libc; | |
use libc::*; | |
use libc::funcs::posix01::signal::signal; | |
fn main() { | |
unsafe { signal(SIGINT, goodbye as u64); } | |
println!("Hello, world!"); |
NewerOlder