]> git.lizzy.rs Git - rust.git/blob - tests/ui/def_id_nocore.rs
Merge remote-tracking branch 'upstream/rust-1.36.0' into backport_merge
[rust.git] / tests / ui / def_id_nocore.rs
1 // ignore-windows
2 // ignore-macos
3
4 #![feature(no_core, lang_items, start)]
5 #![no_core]
6
7 #[link(name = "c")]
8 extern "C" {}
9
10 #[lang = "sized"]
11 pub trait Sized {}
12 #[lang = "copy"]
13 pub trait Copy {}
14 #[lang = "freeze"]
15 pub unsafe trait Freeze {}
16
17 #[lang = "start"]
18 #[start]
19 fn start(_argc: isize, _argv: *const *const u8) -> isize {
20     0
21 }
22
23 pub struct A;
24
25 impl A {
26     pub fn as_ref(self) -> &'static str {
27         "A"
28     }
29 }