diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-02-14 10:08:19 +0000 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-02-14 10:08:19 +0000 |
| commit | c0c106d4aabf3866177fedf943bb00983dbb787c (patch) | |
| tree | c1145bb942876d5df3a8f4477590eb4588afece2 | |
| parent | 8dda1ebfb6d22de555b05c2d2e882adfe967a18f (diff) | |
| parent | 7a4b898b2da509574ae0b296a11c0bef6e570f5e (diff) | |
Sync from rust a567209daab72b7ea59eac533278064396bb0534
| -rw-r--r-- | example/mini_core.rs | 3 | ||||
| -rw-r--r-- | src/abi/mod.rs | 6 | ||||
| -rw-r--r-- | src/base.rs | 4 | ||||
| -rw-r--r-- | src/vtable.rs | 2 |
4 files changed, 7 insertions, 8 deletions
diff --git a/example/mini_core.rs b/example/mini_core.rs index a0a381638c0..79820232496 100644 --- a/example/mini_core.rs +++ b/example/mini_core.rs @@ -57,6 +57,9 @@ impl<T: ?Sized> LegacyReceiver for Box<T> {} #[lang = "copy"] pub trait Copy {} +#[lang = "bikeshed_guaranteed_no_drop"] +pub trait BikeshedGuaranteedNoDrop {} + impl Copy for bool {} impl Copy for u8 {} impl Copy for u16 {} diff --git a/src/abi/mod.rs b/src/abi/mod.rs index fdcd9caf4ac..756a2226753 100644 --- a/src/abi/mod.rs +++ b/src/abi/mod.rs @@ -65,11 +65,7 @@ pub(crate) fn conv_to_call_conv(sess: &Session, c: Conv, default_call_conv: Call sess.dcx().fatal("C-cmse-nonsecure-entry call conv is not yet implemented"); } - Conv::Msp430Intr - | Conv::PtxKernel - | Conv::GpuKernel - | Conv::AvrInterrupt - | Conv::AvrNonBlockingInterrupt => { + Conv::Msp430Intr | Conv::GpuKernel | Conv::AvrInterrupt | Conv::AvrNonBlockingInterrupt => { unreachable!("tried to use {c:?} call conv which only exists on an unsupported target"); } } diff --git a/src/base.rs b/src/base.rs index a2b9e5712e5..125a9201831 100644 --- a/src/base.rs +++ b/src/base.rs @@ -900,8 +900,8 @@ fn codegen_stmt<'tcx>( }; let data = codegen_operand(fx, data); let meta = codegen_operand(fx, meta); - assert!(data.layout().ty.is_unsafe_ptr()); - assert!(layout.ty.is_unsafe_ptr()); + assert!(data.layout().ty.is_raw_ptr()); + assert!(layout.ty.is_raw_ptr()); let ptr_val = if meta.layout().is_zst() { data.cast_pointer_to(layout) } else { diff --git a/src/vtable.rs b/src/vtable.rs index a460023b59c..9d9e0462a9b 100644 --- a/src/vtable.rs +++ b/src/vtable.rs @@ -48,7 +48,7 @@ pub(crate) fn get_ptr_and_method_ref<'tcx>( ) -> (Pointer, Value) { let (ptr, vtable) = 'block: { if let BackendRepr::Scalar(_) = arg.layout().backend_repr { - while !arg.layout().ty.is_unsafe_ptr() && !arg.layout().ty.is_ref() { + while !arg.layout().ty.is_raw_ptr() && !arg.layout().ty.is_ref() { let (idx, _) = arg .layout() .non_1zst_field(fx) |
