.collect();
// Stop if there were any errors when lowering the register classes
- if operands.len() != asm.operands.len() {
+ if operands.len() != asm.operands.len() || sess.asm_arch.is_none() {
return hir::ExprKind::Err;
}
--- /dev/null
+// compile-flags: --target wasm32-unknown-unknown
+
+#![feature(no_core, lang_items, rustc_attrs)]
+#![no_core]
+
+#[rustc_builtin_macro]
+macro_rules! asm {
+ () => {};
+}
+#[lang = "sized"]
+trait Sized {}
+
+fn main() {
+ unsafe {
+ asm!("");
+ //~^ ERROR asm! is unsupported on this target
+ }
+}
--- /dev/null
+error[E0472]: asm! is unsupported on this target
+ --> $DIR/bad-arch.rs:15:9
+ |
+LL | asm!("");
+ | ^^^^^^^^^
+
+error: aborting due to previous error
+
-// ignore-emscripten
+// only-x86_64
fn main() {
unsafe {
-// ignore-emscripten
+// only-x86_64
fn main() {
unsafe {