]> git.lizzy.rs Git - rust.git/blob - tests/ui/lang-items/issue-87573.rs
Auto merge of #106458 - albertlarsan68:move-tests, r=jyn514
[rust.git] / tests / ui / lang-items / issue-87573.rs
1 // Regression test for #87573, ensures that duplicate lang items or invalid generics
2 // for lang items doesn't cause ICE.
3
4 #![feature(no_core, lang_items)]
5 #![no_core]
6 #![crate_type = "lib"]
7
8 pub static STATIC_BOOL: bool = true;
9
10 #[lang = "sized"]
11 trait Sized {}
12
13 #[lang = "copy"]
14 trait Copy {}
15
16 #[lang = "sync"]
17 trait Sync {}
18 impl Sync for bool {}
19
20 #[lang = "drop_in_place"]
21 //~^ ERROR: `drop_in_place` language item must be applied to a function with at least 1 generic argument
22 fn drop_fn() {
23     while false {}
24 }
25
26 #[lang = "start"]
27 //~^ ERROR: `start` language item must be applied to a function with 1 generic argument
28 fn start(){}