We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d631662 commit caa23f1Copy full SHA for caa23f1
src/base.rs
@@ -767,6 +767,15 @@ fn codegen_stmt<'tcx>(
767
NullOp::OffsetOf(fields) => {
768
layout.offset_of_subfield(fx, fields.iter()).bytes()
769
}
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
+ }
779
};
780
let val = CValue::by_val(
781
fx.bcx.ins().iconst(fx.pointer_type, i64::try_from(val).unwrap()),
0 commit comments