]> git.lizzy.rs Git - rust.git/blob - tests/ui/def_id_nocore.rs
removing unsafe from test fn's && renaming shrink to sugg_span
[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 #![allow(clippy::missing_safety_doc)]
7
8 #[link(name = "c")]
9 extern "C" {}
10
11 #[lang = "sized"]
12 pub trait Sized {}
13 #[lang = "copy"]
14 pub trait Copy {}
15 #[lang = "freeze"]
16 pub unsafe trait Freeze {}
17
18 #[lang = "start"]
19 fn start<T>(_main: fn() -> T, _argc: isize, _argv: *const *const u8) -> isize {
20     0
21 }
22
23 fn main() {}
24
25 struct A;
26
27 impl A {
28     pub fn as_ref(self) -> &'static str {
29         "A"
30     }
31 }