rust: bitmap: fix intra-doc link
Subsystems (2)
Miguel Ojeda
maintainerPATCH 1/1 rust: bitmap: fix intra-doc link
BitmapVec::MAX_LEN does not exist in 6.18.y, so rustdoc warns:
warning: unresolved link to `BitmapVec::MAX_LEN`
--> rust/kernel/bitmap.rs:24:25
|
24 | /// This also matches [`BitmapVec::MAX_LEN`].
| ^^^^^^^^^^^^^^^^^^ the struct `BitmapVec` has no field or associated item named `MAX_LEN`
|
= note: `#[warn(rustdoc::broken_intra_doc_links)]` on by defaultThus link to BitmapVec::new() instead.
---
Another option (cleaner but a bigger change) is to cherry-pick:
f5535d78e126 ("rust: bitmap: add MAX_LEN and MAX_INLINE_LEN constants")
rust/kernel/bitmap.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
rust/kernel/bitmap.rs +1 -1
@@ -21,7 +21,7 @@/// Must reference a `[c_ulong]` long enough to fit `data.len()` bits. /// Must not be longer than [`i32::MAX`] bits, so offsets and lengths used with /// [`Bitmap`] functions fit in the `int` and `unsigned int` arguments of the C bitmap API. -/// This also matches [`BitmapVec::MAX_LEN`]. +/// This also matches the maximum length accepted by [`BitmapVec::new`]. #[cfg_attr( CONFIG_64BIT , repr(align( 8 )))] #[cfg_attr(not( CONFIG_64BIT ), repr(align( 4 )))] pub struct Bitmap {
base-commit: a7c80de5ffd00886e3e6b7469611536b0d481cda --
2.56.0
Quoted 10 lines · Miguel Ojeda
BitmapVec::MAX_LENdoes not exist in 6.18.y, sorustdocwarns:warning: unresolved link to `BitmapVec::MAX_LEN` --> rust/kernel/bitmap.rs:24:25 | 24 | /// This also matches [`BitmapVec::MAX_LEN`]. | ^^^^^^^^^^^^^^^^^^ the struct `BitmapVec` has no field or associated item named `MAX_LEN` | = note: `#[warn(rustdoc::broken_intra_doc_links)]` on by default
Quoted 8 lines
Thus link to
BitmapVec::new()instead.Fixes 37f45fe068e0 ("rust: bitmap: restrict bitmap length to at most i32::MAX")Signed-off-by Miguel Ojeda <[email protected]>---
Another option (cleaner but a bigger change) is to cherry-pick:
f5535d78e126("rust: bitmap: addMAX_LENandMAX_INLINE_LENconstants")
Both options (this one-liner fix or cherry-picking f5535d78e126) look good to me.
Alice
Quoted 1 line
BitmapVec::MAX_LENdoes not exist in 6.18.y, sorustdocwarns:
Queued for 6.18, thanks.
Signature · 2 lines
Thanks, Sasha