]> git.hungrycats.org Git - linux/commit
rust: ptr: rename `ProjectIndex::index` to `build_index`
authorGary Guo <gary@garyguo.net>
Tue, 2 Jun 2026 14:17:52 +0000 (15:17 +0100)
committerMiguel Ojeda <ojeda@kernel.org>
Fri, 5 Jun 2026 08:11:05 +0000 (10:11 +0200)
commit735bc1c843101aa2383061acb73d3824c7a66e11
treef0662c2b80ad7e3db7554b784a33583c1792579f
parent03e8578813157c74d9f7033bd797b3939f2facd6
rust: ptr: rename `ProjectIndex::index` to `build_index`

The corresponding `SliceIndex` trait in Rust uses `index` to mean the
panicking variant, which is also being added to `ProjectIndex`. Hence
rename our custom `build_error!` index variant to `build_index`.

Suggested-by: Alexandre Courbot <acourbot@nvidia.com>
Link: https://lore.kernel.org/rust-for-linux/DI5LLN2V3XCS.34H4CG99N4MPA@nvidia.com
Signed-off-by: Gary Guo <gary@garyguo.net>
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Acked-by: Danilo Krummrich <dakr@kernel.org>
Link: https://patch.msgid.link/20260602-projection-syntax-rework-v2-1-6989470f5440@garyguo.net
[ Reworded docs slightly. - Miguel ]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
rust/kernel/ptr/projection.rs