]>
Commit | Line | Data |
---|---|---|
c295e0f8 XL |
1 | // Compiler: |
2 | // | |
3 | // Run-time: | |
4 | // status: 2 | |
5 | ||
6 | #![feature(auto_traits, lang_items, no_core, start, intrinsics)] | |
7 | ||
8 | #![no_std] | |
9 | #![no_core] | |
10 | ||
11 | mod libc { | |
12 | #[link(name = "c")] | |
13 | extern "C" { | |
14 | pub fn exit(status: i32); | |
15 | } | |
16 | } | |
17 | ||
18 | /* | |
19 | * Core | |
20 | */ | |
21 | ||
22 | // Because we don't have core yet. | |
23 | #[lang = "sized"] | |
24 | pub trait Sized {} | |
25 | ||
26 | #[lang = "copy"] | |
27 | trait Copy { | |
28 | } | |
29 | ||
30 | impl Copy for isize {} | |
31 | ||
32 | #[lang = "receiver"] | |
33 | trait Receiver { | |
34 | } | |
35 | ||
36 | #[lang = "freeze"] | |
37 | pub(crate) unsafe auto trait Freeze {} | |
38 | ||
39 | /* | |
40 | * Code | |
41 | */ | |
42 | ||
43 | #[start] | |
44 | fn main(mut argc: isize, _argv: *const *const u8) -> isize { | |
45 | unsafe { | |
46 | libc::exit(2); | |
47 | } | |
48 | 0 | |
49 | } |