Re: [PATCH RFC v3 00/15] rust: Reimplement ThisModule to fix ownership problems
From: Miguel Ojeda
Date: Tue Jan 13 2026 - 05:33:57 EST
On Mon, Jan 12, 2026 at 6:56 PM Christophe Leroy (CS GROUP)
<chleroy@xxxxxxxxxx> wrote:
>
> Shouldn't it be called this_module instead of ThisModule ?
The common Rust style, which we use in the kernel as well, uses
several kinds of casing to make it easy to distinguish between types
of entities at a glance.
Traits use CamelCase, like structs and enums. So if `ThisModule` is a
trait, that would be its case.
But, for instance, if it were a constant, then it would be `THIS_MODULE`.
Details at https://rust-lang.github.io/api-guidelines/naming.html --
sometimes we may diverge from that, but in general we follow the usual
style.
Cheers,
Miguel