mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-27 18:56:24 +00:00

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.
12 lines
381 B
Plaintext
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`.
|