]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_codegen_gcc/tests/run/tuple.rs
Rollup merge of #99192 - Amanieu:fix-asm-srcloc, r=petrochenkov
[rust.git] / compiler / rustc_codegen_gcc / tests / run / tuple.rs
1 // Compiler:
2 //
3 // Run-time:
4 //   status: 0
5 //   stdout: 3
6
7 #![feature(auto_traits, lang_items, no_core, start, intrinsics)]
8
9 #![no_std]
10 #![no_core]
11
12 /*
13  * Core
14  */
15
16 // Because we don't have core yet.
17 #[lang = "sized"]
18 pub trait Sized {}
19
20 #[lang = "copy"]
21 trait Copy {
22 }
23
24 impl Copy for isize {}
25
26 #[lang = "receiver"]
27 trait Receiver {
28 }
29
30 #[lang = "freeze"]
31 pub(crate) unsafe auto trait Freeze {}
32
33 mod libc {
34     #[link(name = "c")]
35     extern "C" {
36         pub fn printf(format: *const i8, ...) -> i32;
37     }
38 }
39
40 /*
41  * Code
42  */
43
44 #[start]
45 fn main(mut argc: isize, _argv: *const *const u8) -> isize {
46     let test: (isize, isize, isize) = (3, 1, 4);
47     unsafe {
48         libc::printf(b"%ld\n\0" as *const u8 as *const i8, test.0);
49     }
50     0
51 }