Re: [PATCH 13/33] rust: block: update `const_refs_to_static` MSRV TODO comment

From: Gary Guo

Date: Wed Apr 01 2026 - 21:43:40 EST


On Wed Apr 1, 2026 at 11:59 PM BST, Tamir Duberstein wrote:
> On Wed, 01 Apr 2026 13:45:20 +0200, Miguel Ojeda <ojeda@xxxxxxxxxx> wrote:
>> diff --git a/rust/kernel/block/mq/gen_disk.rs b/rust/kernel/block/mq/gen_disk.rs
>> index c8b0ecb17082..912cb805caf5 100644
>> --- a/rust/kernel/block/mq/gen_disk.rs
>> +++ b/rust/kernel/block/mq/gen_disk.rs
>> @@ -140,9 +140,7 @@ pub fn build<T: Operations>(
>> devnode: None,
>> alternative_gpt_sector: None,
>> get_unique_id: None,
>> - // TODO: Set to THIS_MODULE. Waiting for const_refs_to_static feature to
>> - // be merged (unstable in rustc 1.78 which is staged for linux 6.10)
>> - // <https://github.com/rust-lang/rust/issues/119618>
>> + // TODO: Set to `THIS_MODULE`.
>
> Good first issue?

It's actually quite tricky. There're already attempts on the list, although I'm
not very happy with the solution.

The tricky part is that `THIS_MODULE` needs to be supplied by the leaf module,
it cannot be constructed inside the kernel crate.

Best,
Gary

>
> Reviewed-by: Tamir Duberstein <tamird@xxxxxxxxxx>