]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/def_id_nocore.rs
Rollup merge of #95005 - ssomers:btree_static_assert, r=thomcc
[rust.git] / src / tools / clippy / tests / ui / def_id_nocore.rs
1 // ignore-macos
2
3 #![feature(no_core, lang_items, start)]
4 #![no_core]
5 #![allow(clippy::missing_safety_doc)]
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 fn start<T>(_main: fn() -> T, _argc: isize, _argv: *const *const u8) -> isize {
19     0
20 }
21
22 fn main() {}
23
24 struct A;
25
26 impl A {
27     pub fn as_ref(self) -> &'static str {
28         "A"
29     }
30 }