2023-07-02 07:35:19 -05:00
|
|
|
//@ignore-target-apple
|
2019-08-26 05:11:47 -05:00
|
|
|
|
|
|
|
#![feature(no_core, lang_items, start)]
|
|
|
|
#![no_core]
|
2021-10-07 04:21:30 -05:00
|
|
|
#![allow(clippy::missing_safety_doc)]
|
2019-08-26 05:11:47 -05:00
|
|
|
|
|
|
|
#[link(name = "c")]
|
|
|
|
extern "C" {}
|
|
|
|
|
|
|
|
#[lang = "sized"]
|
|
|
|
pub trait Sized {}
|
|
|
|
#[lang = "copy"]
|
|
|
|
pub trait Copy {}
|
|
|
|
#[lang = "freeze"]
|
|
|
|
pub unsafe trait Freeze {}
|
|
|
|
|
|
|
|
#[lang = "start"]
|
2022-12-23 12:54:14 -06:00
|
|
|
fn start<T>(_main: fn() -> T, _argc: isize, _argv: *const *const u8, _sigpipe: u8) -> isize {
|
2019-08-26 05:11:47 -05:00
|
|
|
0
|
|
|
|
}
|
|
|
|
|
2021-09-10 08:33:06 -05:00
|
|
|
fn main() {}
|
|
|
|
|
2021-06-03 01:41:37 -05:00
|
|
|
struct A;
|
2019-08-26 05:11:47 -05:00
|
|
|
|
|
|
|
impl A {
|
|
|
|
pub fn as_ref(self) -> &'static str {
|
2023-08-24 14:32:12 -05:00
|
|
|
//~^ ERROR: methods called `as_*` usually take `self` by reference or `self` by mutabl
|
2019-08-26 05:11:47 -05:00
|
|
|
"A"
|
|
|
|
}
|
|
|
|
}
|