]> git.proxmox.com Git - rustc.git/blob - tests/ui/borrowck/issue-92157.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / borrowck / issue-92157.rs
1 #![feature(no_core)]
2 #![feature(lang_items)]
3
4 #![no_core]
5
6 #[cfg(target_os = "linux")]
7 #[link(name = "c")]
8 extern {}
9
10 #[lang = "start"]
11 fn start<T>(_main: fn() -> T, _argc: isize, _argv: *const *const u8) -> isize {
12 //~^ ERROR: incorrect number of parameters for the `start` lang item
13 40+2
14 }
15
16 #[lang = "sized"]
17 pub trait Sized {}
18 #[lang = "copy"]
19 pub trait Copy {}
20
21 #[lang = "drop_in_place"]
22 #[allow(unconditional_recursion)]
23 pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {
24 drop_in_place(to_drop)
25 }
26
27 #[lang = "add"]
28 trait Add<RHS> {
29 type Output;
30 fn add(self, other: RHS) -> Self::Output;
31 }
32
33 impl Add<isize> for isize {
34 type Output = isize;
35 fn add(self, other: isize) -> isize {
36 self + other
37 }
38 }
39
40 fn main() {}