Sync from rust a567209daa
This commit is contained in:
commit
c0c106d4aa
4 changed files with 7 additions and 8 deletions
|
|
@ -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 {}
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue