Re: [PATCH] rust: id_pool: fix example
From: Alice Ryhl
Date: Mon Dec 01 2025 - 05:08:32 EST
On Mon, Dec 01, 2025 at 01:09:49AM +0100, Miguel Ojeda wrote:
> When building with KUnit doctests enabled, `rustc` reports:
>
> error[E0599]: no method named `acquire_next_id` found for struct `IdPool` in the current scope
> --> rust/doctests_kernel_generated.rs:6722:24
> |
> 6722 | assert_eq!(i, pool.acquire_next_id(i).ok_or(ENOSPC)?);
> | ^^^^^^^^^^^^^^^ method not found in `IdPool`
>
> Thus fix it.
>
> Fixes: a5726454470c ("rust: id_pool: do not immediately acquire new ids")
> Signed-off-by: Miguel Ojeda <ojeda@xxxxxxxxxx>
Reviewed-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>