Re: [PATCH v4 9/9] rust: macros: remove `THIS_MODULE` static from `module!`

From: Andreas Hindborg

Date: Tue Jun 23 2026 - 08:31:28 EST


Alvin Sun <alvin.sun@xxxxxxxxx> writes:

> All users have been migrated to `ModuleMetadata::THIS_MODULE` const or
> `this_module::<LocalModule>()` helper. The `static THIS_MODULE`
> generated by the `module!` macro is no longer referenced anywhere,
> so remove it to avoid having two sources of the same `ThisModule`
> pointer.
>
> Signed-off-by: Alvin Sun <alvin.sun@xxxxxxxxx>

Reviewed-by: Andreas Hindborg <a.hindborg@xxxxxxxxxx>


Best regards,
Andreas Hindborg