lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c17c1506-6ac5-49d4-b5ef-34d90dcaa41b@de.bosch.com>
Date: Tue, 20 Jan 2026 13:47:28 +0100
From: Dirk Behme <dirk.behme@...bosch.com>
To: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
CC: Alexandre Courbot <acourbot@...dia.com>, Miguel Ojeda <ojeda@...nel.org>,
	Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>,
	Björn Roy Baron <bjorn3_gh@...tonmail.com>, Benno Lossin
	<lossin@...nel.org>, Andreas Hindborg <a.hindborg@...nel.org>, Alice Ryhl
	<aliceryhl@...gle.com>, Trevor Gross <tmgross@...ch.edu>, Danilo Krummrich
	<dakr@...nel.org>, Yury Norov <yury.norov@...il.com>, John Hubbard
	<jhubbard@...dia.com>, Alistair Popple <apopple@...dia.com>, Joel Fernandes
	<joelagnelf@...dia.com>, Timur Tabi <ttabi@...dia.com>, Edwin Peer
	<epeer@...dia.com>, Eliot Courtney <ecourtney@...dia.com>, Daniel Almeida
	<daniel.almeida@...labora.com>, Steven Price <steven.price@....com>,
	<rust-for-linux@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 3/6] rust: add `bitfield!` macro

On 20/01/2026 13:37, Miguel Ojeda wrote:
> On Tue, Jan 20, 2026 at 12:45 PM Dirk Behme <dirk.behme@...bosch.com> wrote:
>>
>> What have I missed?
> 
> I think the patch is missing enabling the (already stable by now)
> feature. If you add it at the top of `rust/kernel/lib.rs`, does it
> work for you?

Yes :)

And I think we need the same for the doctests where it fails as well then:

error[E0747]: type provided when a constant was expected
     --> rust/doctests_kernel_generated.rs:2758:1
      |
2758 | / bitfield! {
2759 | |     pub struct Config(u8) {
2760 | |         3:0 nibble;
2761 | |     }
2762 | | }
      | |_^
      |
      = help: const arguments cannot yet be inferred with `_`
      = help: add `#![feature(generic_arg_infer)]` to the crate 
attributes to enable
      = note: this error originates in the macro `::kernel::bitfield` 
which comes from the expansion of the macro `bitfield` (in Nightly 
builds, run with -Z macro-backtrace for more info)

error[E0747]: type provided when a constant was expected
     --> rust/doctests_kernel_generated.rs:2846:1
      |
2846 | / bitfield! {
2847 | |     pub struct Control(u32) {
2848 | |         0:0 power => Power;
2849 | |     }
2850 | | }
      | |_^
      |
      = help: const arguments cannot yet be inferred with `_`
      = help: add `#![feature(generic_arg_infer)]` to the crate 
attributes to enable
      = note: this error originates in the macro `::kernel::bitfield` 
which comes from the expansion of the macro `bitfield` (in Nightly 
builds, run with -Z macro-backtrace for more info)

error[E0747]: type provided when a constant was expected
     --> rust/doctests_kernel_generated.rs:2934:41
      |
2934 |             Mode::Low => Bounded::<u32, _>::new::<0>(),
      |                                         ^
      |
      = help: const arguments cannot yet be inferred with `_`
      = help: add `#![feature(generic_arg_infer)]` to the crate 
attributes to enable

...


Thanks!

Dirk


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ