rust/tests/ui/extern/fictional-abi.stderr
Jubilee Young 3f50076fb3 compiler: gate extern "{abi}" in ast_lowering
By moving this stability check into AST lowering, we effectively make
it impossible to accidentally miss, as it must happen to generate HIR.
Also, we put the ABI-stability code next to code that actually uses it!
This allows code that wants to reason about backend ABI implementations
to stop worrying about high-level concerns like syntax stability,
while still leaving it as the authority on what ABIs actually exist.

It also makes it easy to refactor things to have more consistent errors.
For now, we only apply this to generalize the existing messages a bit.
2025-02-09 20:36:59 -08:00

12 lines
381 B
Plaintext

error[E0703]: invalid ABI: found `fictional`
--> $DIR/fictional-abi.rs:3:12
|
LL | pub extern "fictional" fn lol() {}
| ^^^^^^^^^^^ invalid ABI
|
= note: invoke `rustc --print=calling-conventions` for a full list of supported calling conventions
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0703`.