Give better error for unsupported asm!()

This commit is contained in:
bjorn3 2023-10-21 16:39:54 +00:00
parent eb30083b69
commit 78cd77f1f1

View File

@ -228,6 +228,16 @@ pub(crate) fn codegen_inline_asm<'tcx>(
fx.bcx.ins().jump(destination_block, &[]);
return;
}
if cfg!(not(feature = "inline_asm")) {
fx.tcx.sess.span_err(
span,
"asm! and global_asm! support is disabled while compiling rustc_codegen_cranelift",
);
} else {
fx.tcx.sess.span_err(span, "asm! and global_asm! are not yet supported on Windows");
}
return;
}
let operands = operands