On 9/8/2025 2:39 PM, Miguel Ojeda wrote: > On Mon, Sep 8, 2025 at 7:06 PM Joel Fernandes <[email protected]> wrote: >> >> The issue I ran into is, without adding it to prelude, the users of register! >> macro will have to import both bitfield! and register! macros explictly, even >> though they're only using register!. I tried to make it work without adding >> to >> prelude, but couldn't: >> >> use kernel::{bitfield, register}; >> >> Also not adding it to prelude, means register! macro has to invoke bitfield >> with >> $crate prefixed ($crate::bitfield). > > I am not sure I follow -- macros should use qualified paths in general > so that they assume as little as possible from the calling > environment. > > It should work without the prelude -- what didn't work? Ah, I guess my intent was to not use the qualified path. But that's better than the users having to import prelude. Ok, thanks! - I will try this out. - Joel > > Thanks! > > Cheers, > Miguel
- Re: [PATCH v2 1/4] nova-core: bitstruct... Joel Fernandes
- Re: [PATCH v2 1/4] nova-core: bits... Alexandre Courbot
- Re: [PATCH v2 1/4] nova-core: ... Joel Fernandes
- [PATCH v2 4/4] rust: Move register and bitstruct macros ... Joel Fernandes
- Re: [PATCH v2 4/4] rust: Move register and bitstruc... Daniel Almeida
- Re: [PATCH v2 4/4] rust: Move register and bits... Joel Fernandes
- Re: [PATCH v2 4/4] rust: Move register and bitstruc... Elle Rhumsaa
- Re: [PATCH v2 4/4] rust: Move register and bitstruc... Miguel Ojeda
- Re: [PATCH v2 4/4] rust: Move register and bits... Joel Fernandes
- Re: [PATCH v2 4/4] rust: Move register and ... Miguel Ojeda
- Re: [PATCH v2 4/4] rust: Move register ... Joel Fernandes
- Re: [PATCH v2 4/4] rust: Move register ... Joel Fernandes
- Re: [PATCH v2 4/4] rust: Move register and bitstruc... Alexandre Courbot
- Re: [PATCH v2 4/4] rust: Move register and bits... Joel Fernandes
- [PATCH v2 3/4] nova-core: bitstruct: Add support for cus... Joel Fernandes
- Re: [PATCH v2 3/4] nova-core: bitstruct: Add suppor... Elle Rhumsaa
- Re: [PATCH v2 3/4] nova-core: bitstruct: Add suppor... Elle Rhumsaa
- Re: [PATCH v2 3/4] nova-core: bitstruct: Add suppor... Alexandre Courbot
- Re: [PATCH v2 3/4] nova-core: bitstruct: Add su... Alexandre Courbot
- Re: [PATCH v2 3/4] nova-core: bitstruct: Ad... Joel Fernandes
- Re: [PATCH v2 3/4] nova-core: bitstruct: Add su... Joel Fernandes
