Skip to content

Commit 2e4f982

Browse files
committed
rust: rbtree: fix overindented list item
Starting with Rust 1.86.0 (to be released 2025-04-03), Clippy will have a new lint, `doc_overindented_list_items` [1], which catches cases of overindented list items. The lint has been added by Yutaro Ohno, based on feedback from the kernel [2] on a patch that fixed a similar case -- commit 0c5928d ("rust: block: fix formatting in GenDisk doc"). Clippy reports a few cases in the kernel, apart from the one already fixed in the commit above. One is this one: error: doc list item overindented --> rust/kernel/rbtree.rs:1152:5 | 1152 | /// null, it is a pointer to the root of the [`RBTree`]. | ^^^^ help: try using ` ` (2 spaces) | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items = note: `-D clippy::doc-overindented-list-items` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::doc_overindented_list_items)]` Thus clean it up. Cc: Yutaro Ohno <yutaro.ono.418@gmail.com> Cc: stable@vger.kernel.org # Needed in 6.12.y and 6.13.y only (Rust is pinned in older LTSs). Fixes: a335e95 ("rust: rbtree: add `RBTree::entry`") Link: rust-lang/rust-clippy#13711 [1] Link: rust-lang/rust-clippy#13601 [2] Reviewed-by: Alice Ryhl <aliceryhl@google.com> Reviewed-by: Yutaro Ohno <yutaro.ono.418@gmail.com> Link: https://lore.kernel.org/r/20250206232022.599998-1-ojeda@kernel.org [ There are a few other cases, so updated message. - Miguel ] Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
1 parent cee6f9a commit 2e4f982

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rust/kernel/rbtree.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1149,7 +1149,7 @@ pub struct VacantEntry<'a, K, V> {
11491149
/// # Invariants
11501150
/// - `parent` may be null if the new node becomes the root.
11511151
/// - `child_field_of_parent` is a valid pointer to the left-child or right-child of `parent`. If `parent` is
1152-
/// null, it is a pointer to the root of the [`RBTree`].
1152+
/// null, it is a pointer to the root of the [`RBTree`].
11531153
struct RawVacantEntry<'a, K, V> {
11541154
rbtree: *mut RBTree<K, V>,
11551155
/// The node that will become the parent of the new node if we insert one.

0 commit comments

Comments
 (0)