diff options
| author | Ben Kimock <kimockb@gmail.com> | 2024-11-09 06:57:05 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-09 06:57:05 +0000 |
| commit | c272bb4ec0a09744bef47fbe15ac6cded53d0216 (patch) | |
| tree | 0c85c9634f6ff5ec409a9589eb9636d8a1d435b9 /compiler/rustc_codegen_cranelift/example | |
| parent | d7aceeea71d4d32c7db671d39a448aa051bc90f6 (diff) | |
| parent | 15d883e5b73ce6758926d8e3ef4a307f9ac6092f (diff) | |
| download | rust-c272bb4ec0a09744bef47fbe15ac6cded53d0216.tar.gz rust-c272bb4ec0a09744bef47fbe15ac6cded53d0216.zip | |
Merge pull request #4019 from rust-lang/rustup-2024-11-09
Automatic Rustup
Diffstat (limited to 'compiler/rustc_codegen_cranelift/example')
| -rw-r--r-- | compiler/rustc_codegen_cranelift/example/mini_core.rs | 83 |
1 files changed, 64 insertions, 19 deletions
diff --git a/compiler/rustc_codegen_cranelift/example/mini_core.rs b/compiler/rustc_codegen_cranelift/example/mini_core.rs index 42c7f5f0dc6..3da215fe6c0 100644 --- a/compiler/rustc_codegen_cranelift/example/mini_core.rs +++ b/compiler/rustc_codegen_cranelift/example/mini_core.rs @@ -616,25 +616,70 @@ pub union MaybeUninit<T> { } pub mod intrinsics { - extern "rust-intrinsic" { - #[rustc_safe_intrinsic] - pub fn abort() -> !; - #[rustc_safe_intrinsic] - pub fn size_of<T>() -> usize; - pub fn size_of_val<T: ?::Sized>(val: *const T) -> usize; - #[rustc_safe_intrinsic] - pub fn min_align_of<T>() -> usize; - pub fn min_align_of_val<T: ?::Sized>(val: *const T) -> usize; - pub fn copy<T>(src: *const T, dst: *mut T, count: usize); - pub fn transmute<T, U>(e: T) -> U; - pub fn ctlz_nonzero<T>(x: T) -> u32; - #[rustc_safe_intrinsic] - pub fn needs_drop<T: ?::Sized>() -> bool; - #[rustc_safe_intrinsic] - pub fn bitreverse<T>(x: T) -> T; - #[rustc_safe_intrinsic] - pub fn bswap<T>(x: T) -> T; - pub fn write_bytes<T>(dst: *mut T, val: u8, count: usize); + #[rustc_intrinsic] + #[rustc_intrinsic_must_be_overridden] + pub fn abort() -> ! { + loop {} + } + #[rustc_intrinsic] + #[rustc_intrinsic_must_be_overridden] + pub fn size_of<T>() -> usize { + loop {} + } + #[rustc_intrinsic] + #[rustc_intrinsic_must_be_overridden] + pub unsafe fn size_of_val<T: ?::Sized>(_val: *const T) -> usize { + loop {} + } + #[rustc_intrinsic] + #[rustc_intrinsic_must_be_overridden] + pub fn min_align_of<T>() -> usize { + loop {} + } + #[rustc_intrinsic] + #[rustc_intrinsic_must_be_overridden] + pub unsafe fn min_align_of_val<T: ?::Sized>(_val: *const T) -> usize { + loop {} + } + #[rustc_intrinsic] + #[rustc_intrinsic_must_be_overridden] + pub unsafe fn copy<T>(_src: *const T, _dst: *mut T, _count: usize) { + loop {} + } + #[rustc_intrinsic] + #[rustc_intrinsic_must_be_overridden] + pub unsafe fn transmute<T, U>(_e: T) -> U { + loop {} + } + #[rustc_intrinsic] + #[rustc_intrinsic_must_be_overridden] + pub unsafe fn ctlz_nonzero<T>(_x: T) -> u32 { + loop {} + } + #[rustc_intrinsic] + #[rustc_intrinsic_must_be_overridden] + pub fn needs_drop<T: ?::Sized>() -> bool { + loop {} + } + #[rustc_intrinsic] + #[rustc_intrinsic_must_be_overridden] + pub fn bitreverse<T>(_x: T) -> T { + loop {} + } + #[rustc_intrinsic] + #[rustc_intrinsic_must_be_overridden] + pub fn bswap<T>(_x: T) -> T { + loop {} + } + #[rustc_intrinsic] + #[rustc_intrinsic_must_be_overridden] + pub unsafe fn write_bytes<T>(_dst: *mut T, _val: u8, _count: usize) { + loop {} + } + #[rustc_intrinsic] + #[rustc_intrinsic_must_be_overridden] + pub unsafe fn unreachable() -> ! { + loop {} } } |
