Skip to content

Commit c0c106d

Browse files
committed
Sync from rust a567209
2 parents 8dda1eb + 7a4b898 commit c0c106d

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

example/mini_core.rs

+3
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ impl<T: ?Sized> LegacyReceiver for Box<T> {}
5757
#[lang = "copy"]
5858
pub trait Copy {}
5959

60+
#[lang = "bikeshed_guaranteed_no_drop"]
61+
pub trait BikeshedGuaranteedNoDrop {}
62+
6063
impl Copy for bool {}
6164
impl Copy for u8 {}
6265
impl Copy for u16 {}

src/abi/mod.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,7 @@ pub(crate) fn conv_to_call_conv(sess: &Session, c: Conv, default_call_conv: Call
6565
sess.dcx().fatal("C-cmse-nonsecure-entry call conv is not yet implemented");
6666
}
6767

68-
Conv::Msp430Intr
69-
| Conv::PtxKernel
70-
| Conv::GpuKernel
71-
| Conv::AvrInterrupt
72-
| Conv::AvrNonBlockingInterrupt => {
68+
Conv::Msp430Intr | Conv::GpuKernel | Conv::AvrInterrupt | Conv::AvrNonBlockingInterrupt => {
7369
unreachable!("tried to use {c:?} call conv which only exists on an unsupported target");
7470
}
7571
}

src/base.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -900,8 +900,8 @@ fn codegen_stmt<'tcx>(
900900
};
901901
let data = codegen_operand(fx, data);
902902
let meta = codegen_operand(fx, meta);
903-
assert!(data.layout().ty.is_unsafe_ptr());
904-
assert!(layout.ty.is_unsafe_ptr());
903+
assert!(data.layout().ty.is_raw_ptr());
904+
assert!(layout.ty.is_raw_ptr());
905905
let ptr_val = if meta.layout().is_zst() {
906906
data.cast_pointer_to(layout)
907907
} else {

src/vtable.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ pub(crate) fn get_ptr_and_method_ref<'tcx>(
4848
) -> (Pointer, Value) {
4949
let (ptr, vtable) = 'block: {
5050
if let BackendRepr::Scalar(_) = arg.layout().backend_repr {
51-
while !arg.layout().ty.is_unsafe_ptr() && !arg.layout().ty.is_ref() {
51+
while !arg.layout().ty.is_raw_ptr() && !arg.layout().ty.is_ref() {
5252
let (idx, _) = arg
5353
.layout()
5454
.non_1zst_field(fx)

0 commit comments

Comments
 (0)