Error on invalid signatures for interrupt ABIs by folkertdev · Pull Request #142633 · rust-lang/rust

@rustbot rustbot added S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

T-compiler

Relevant to the compiler team, which will review and decide on the PR/issue.

labels

Jun 17, 2025

folkertdev

tgross35

workingjubilee

workingjubilee

workingjubilee

@folkertdev

@bors bors added S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

and removed S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

labels

Jun 24, 2025

workingjubilee added a commit to workingjubilee/rustc that referenced this pull request

Jun 25, 2025
…signature, r=workingjubilee

Error on invalid signatures for interrupt ABIs

We recently added `extern "custom"`, which must have type `fn()`. The various `extern "interrupt"` ABIs impose similar constraints on the signature of functions with that ABI: `x86-interrupt` should not have a return type (linting on the exact argument types is left as future work), and the other interrupt ABIs cannot have any parameters or a return type.

r? `@workingjubilee`

workingjubilee added a commit to workingjubilee/rustc that referenced this pull request

Jun 25, 2025
…signature, r=workingjubilee

Error on invalid signatures for interrupt ABIs

We recently added `extern "custom"`, which must have type `fn()`. The various `extern "interrupt"` ABIs impose similar constraints on the signature of functions with that ABI: `x86-interrupt` should not have a return type (linting on the exact argument types is left as future work), and the other interrupt ABIs cannot have any parameters or a return type.

r? ``@workingjubilee``

This was referenced

Jun 25, 2025

bors added a commit that referenced this pull request

Jun 25, 2025
Rollup of 15 pull requests

Successful merges:

 - #135731 (Implement parsing of pinned borrows)
 - #138780 (Add `#[loop_match]` for improved DFA codegen)
 - #142453 (Windows: make `read_dir` stop iterating after the first error is encountered)
 - #142633 (Error on invalid signatures for interrupt ABIs)
 - #142768 (Avoid a bitcast FFI call in transmuting)
 - #142825 (Port `#[track_caller]` to the new attribute system)
 - #142844 (Enable short-ice for Windows)
 - #142934 (Tweak `-Zmacro-stats` measurement.)
 - #142955 (Couple of test suite fixes for cg_clif)
 - #142977 (rustdoc: Don't mark `#[target_feature]` functions as ⚠)
 - #142980 (Reduce mismatched-lifetime-syntaxes suggestions to MaybeIncorrect)
 - #142982 (Corrected spelling mistake in c_str.rs)
 - #142983 (Taint body on invalid call ABI)
 - #142988 (Update wasm-component-ld to 0.5.14)
 - #142993 (Update cargo)

r? `@ghost`
`@rustbot` modify labels: rollup

rust-timer added a commit that referenced this pull request

Jun 25, 2025
Rollup merge of #142633 - folkertdev:interrupt-abi-restrict-signature, r=workingjubilee

Error on invalid signatures for interrupt ABIs

We recently added `extern "custom"`, which must have type `fn()`. The various `extern "interrupt"` ABIs impose similar constraints on the signature of functions with that ABI: `x86-interrupt` should not have a return type (linting on the exact argument types is left as future work), and the other interrupt ABIs cannot have any parameters or a return type.

r? ```@workingjubilee```

flip1995 pushed a commit to flip1995/rust-clippy that referenced this pull request

Jun 26, 2025

workingjubilee

tautschnig pushed a commit to model-checking/verify-rust-std that referenced this pull request

Jul 3, 2025

@SamB SamB mentioned this pull request

Aug 9, 2025

Zalathar added a commit to Zalathar/rust that referenced this pull request

Aug 14, 2025
…rn-nevermore, r=davidtwco

compiler: Allow `extern "interrupt" fn() -> !`

While reviewing rust-lang#142633 I overlooked a few details because I was kind of excited.

- Fixes rust-lang#143072

Zalathar added a commit to Zalathar/rust that referenced this pull request

Aug 15, 2025
…rn-nevermore, r=davidtwco

compiler: Allow `extern "interrupt" fn() -> !`

While reviewing rust-lang#142633 I overlooked a few details because I was kind of excited.

- Fixes rust-lang#143072

Zalathar added a commit to Zalathar/rust that referenced this pull request

Aug 15, 2025
…rn-nevermore, r=davidtwco

compiler: Allow `extern "interrupt" fn() -> !`

While reviewing rust-lang#142633 I overlooked a few details because I was kind of excited.

- Fixes rust-lang#143072

Zalathar added a commit to Zalathar/rust that referenced this pull request

Aug 15, 2025
…rn-nevermore, r=davidtwco

compiler: Allow `extern "interrupt" fn() -> !`

While reviewing rust-lang#142633 I overlooked a few details because I was kind of excited.

- Fixes rust-lang#143072

rust-timer added a commit that referenced this pull request

Aug 15, 2025
Rollup merge of #143075 - workingjubilee:interrupts-may-return-nevermore, r=davidtwco

compiler: Allow `extern "interrupt" fn() -> !`

While reviewing #142633 I overlooked a few details because I was kind of excited.

- Fixes #143072

github-actions bot pushed a commit to rust-lang/rustc-dev-guide that referenced this pull request

Aug 18, 2025

Kobzol pushed a commit to Kobzol/rustc_codegen_gcc that referenced this pull request

Dec 21, 2025

christian-schilling pushed a commit to christian-schilling/rustc_codegen_cranelift that referenced this pull request

Jan 27, 2026

christian-schilling pushed a commit to christian-schilling/rustc_codegen_cranelift that referenced this pull request

Jan 27, 2026