8 #![allow(unused_attributes)]
9 #![feature(auto_traits, lang_items, no_core, start, intrinsics, arbitrary_self_types)]
18 // Because we don't have core yet.
26 impl Copy for isize {}
27 impl Copy for *mut i32 {}
28 impl Copy for usize {}
38 fn deref(&self) -> &Self::Target;
46 pub(crate) unsafe auto trait Freeze {}
48 #[lang = "panic_location"]
49 struct PanicLocation {
58 pub fn printf(format: *const i8, ...) -> i32;
59 pub fn puts(s: *const u8) -> i32;
60 pub fn fflush(stream: *mut i32) -> i32;
62 pub static STDOUT: *mut i32;
67 extern "rust-intrinsic" {
75 pub fn panic(_msg: &str) -> ! {
77 libc::puts("Panicking\0" as *const str as *const u8);
78 libc::fflush(libc::STDOUT);
84 trait Add<RHS = Self> {
87 fn add(self, rhs: RHS) -> Self::Output;
93 fn add(self, rhs: Self) -> Self {
101 fn add(self, rhs: Self) -> Self {
109 fn add(self, rhs: Self) -> Self {
117 fn add(self, rhs: Self) -> Self {
125 fn add(self, rhs: Self) -> Self {
131 pub trait Sub<RHS = Self> {
134 fn sub(self, rhs: RHS) -> Self::Output;
140 fn sub(self, rhs: Self) -> Self {
148 fn sub(self, rhs: Self) -> Self {
156 fn sub(self, rhs: Self) -> Self {
164 fn sub(self, rhs: Self) -> Self {
172 fn sub(self, rhs: Self) -> Self {
178 pub trait Mul<RHS = Self> {
182 fn mul(self, rhs: RHS) -> Self::Output;
188 fn mul(self, rhs: Self) -> Self::Output {
196 fn mul(self, rhs: Self) -> Self::Output {
204 fn mul(self, rhs: Self) -> Self::Output {
214 fn main(mut argc: isize, _argv: *const *const u8) -> isize {
216 libc::printf(b"%ld\n\0" as *const u8 as *const i8, 40 + argc);
217 libc::printf(b"%ld\n\0" as *const u8 as *const i8, 40 - argc);
218 libc::printf(b"%ld\n\0" as *const u8 as *const i8, 10 * argc);