Skip to content

Commit c98301d

Browse files
committed
Sync from rust 1a648b3
2 parents cdae185 + f90a0b9 commit c98301d

File tree

4 files changed

+70
-7
lines changed

4 files changed

+70
-7
lines changed

Cargo.lock

+58-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/abi/mod.rs

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

59-
Conv::Msp430Intr
60-
| Conv::PtxKernel
61-
| Conv::AmdGpuKernel
62-
| Conv::AvrInterrupt
63-
| Conv::AvrNonBlockingInterrupt => {
59+
Conv::Msp430Intr | Conv::PtxKernel | Conv::AvrInterrupt | Conv::AvrNonBlockingInterrupt => {
6460
unreachable!("tried to use {c:?} call conv which only exists on an unsupported target");
6561
}
6662
}

src/base.rs

+9
Original file line numberDiff line numberDiff line change
@@ -767,6 +767,15 @@ fn codegen_stmt<'tcx>(
767767
NullOp::OffsetOf(fields) => {
768768
layout.offset_of_subfield(fx, fields.iter()).bytes()
769769
}
770+
NullOp::DebugAssertions => {
771+
let val = fx.tcx.sess.opts.debug_assertions;
772+
let val = CValue::by_val(
773+
fx.bcx.ins().iconst(types::I8, i64::try_from(val).unwrap()),
774+
fx.layout_of(fx.tcx.types.bool),
775+
);
776+
lval.write_cvalue(fx, val);
777+
return;
778+
}
770779
};
771780
let val = CValue::by_val(
772781
fx.bcx.ins().iconst(fx.pointer_type, i64::try_from(val).unwrap()),

src/lib.rs

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
#![cfg_attr(doc, doc(rust_logo))]
44
#![feature(rustc_private)]
55
// Note: please avoid adding other feature gates where possible
6+
#![allow(rustc::diagnostic_outside_of_impl)]
7+
#![allow(rustc::untranslatable_diagnostic)]
68
#![warn(rust_2018_idioms)]
79
#![warn(unused_lifetimes)]
810
#![warn(unreachable_pub)]

0 commit comments

Comments
 (0)