const std::string &extern_abi = qualifiers.get_extern_abi ();
abi = get_abi_from_string (extern_abi);
if (has_extern && abi == ABI::UNKNOWN)
- rust_error_at (qualifiers.get_locus (), "unknown ABI option");
+ rust_error_at (qualifiers.get_locus (), ErrorCode::E0703,
+ "invalid ABI: found %qs", extern_abi.c_str ());
}
return HIR::FunctionQualifiers (qualifiers.get_const_status (), unsafety,
const std::string &extern_abi = extern_block.get_abi ();
abi = get_abi_from_string (extern_abi);
if (abi == ABI::UNKNOWN)
- rust_error_at (extern_block.get_locus (), "unknown ABI option");
+ rust_error_at (extern_block.get_locus (), ErrorCode::E0703,
+ "invalid ABI: found %qs", extern_abi.c_str ());
}
HIR::ExternBlock *hir_extern_block
extern "foobar" {
- // { dg-error "unknown ABI option" "" { target *-*-* } .-1 }
+ // { dg-error "invalid ABI: found .foobar." "" { target *-*-* } .-1 }
fn printf(s: *const i8, ...);
}
pub extern "baz" fn test() {}
-// { dg-error "unknown ABI option" "" { target *-*-* } .-1 }
+// { dg-error "invalid ABI: found .baz." "" { target *-*-* } .-1 }
+
+// extern "Rust" fn foo() {} // OK!
\ No newline at end of file