Skip to content

x86-interrupt ABI no longer compiles with never result #143072

@CraftyDH

Description

@CraftyDH

Code

I tried this code:

#![feature(abi_x86_interrupt)]

extern "x86-interrupt" fn foo() -> ! {
    todo!()
}

I expected to see this happen: It compiles.

Instead, this happened:

error: invalid signature for `extern "x86-interrupt"` function
 --> <source>:3:36
  |
3 | extern "x86-interrupt" fn foo() -> ! {
  |                                    ^
  |
  = note: functions with the "custom" ABI cannot have a return type
help: remove the return type
 --> <source>:3:36
  |
3 | extern "x86-interrupt" fn foo() -> ! {
  |                                    ^

Version it worked on

It most recently worked on:

rustc 1.90.0-nightly (28f1c8079 2025-06-24)
binary: rustc
commit-hash: 28f1c807911c63f08d98e7b468cfcf15a441e34b
commit-date: 2025-06-24
host: x86_64-unknown-linux-gnu
release: 1.90.0-nightly
LLVM version: 20.1.7

Version with regression

rustc --version --verbose:

rustc 1.90.0-nightly (0fa4ec6cd 2025-06-25)
binary: rustc
commit-hash: 0fa4ec6cde46fa17ab07acb5531cfe0dc1349ffa
commit-date: 2025-06-25
host: x86_64-unknown-linux-gnu
release: 1.90.0-nightly
LLVM version: 20.1.7

Metadata

Metadata

Labels

C-bugCategory: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions