Re: [PATCH] rust: irq: add `'static` bounds to irq callbacks

From: Alice Ryhl

Date: Sun Feb 15 2026 - 07:13:19 EST


On Sat, Feb 14, 2026 at 10:27 AM Benno Lossin <lossin@xxxxxxxxxx> wrote:
>
> These callback functions take a generic `T` that is used in the body as
> the generic argument in `Registration` and `ThreadedRegistration`. Those
> types require `T: 'static`, but due to a compiler bug this requirement
> isn't propagated to the function. Thus add the bound. This was caught in
> the upstream Rust CI [1].
>
> Signed-off-by: Benno Lossin <lossin@xxxxxxxxxx>
> Link: https://github.com/rust-lang/rust/pull/149389 [1]

Would it not be a cleaner fix to just add 'static as a super-trait to
the traits directly?

trait Handler: Send + Sync + 'static {}

Alice