mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
rust: ptr: remove implicit index projection syntax
All users have been converted to use keyworded index projection syntax to explicitly state their intention when doing index projection. Reviewed-by: Alexandre Courbot <acourbot@nvidia.com> Reviewed-by: Andreas Hindborg <a.hindborg@kernel.org> Reviewed-by: Alice Ryhl <aliceryhl@google.com> Signed-off-by: Gary Guo <gary@garyguo.net> Acked-by: Danilo Krummrich <dakr@kernel.org> Link: https://patch.msgid.link/20260602-projection-syntax-rework-v2-6-6989470f5440@garyguo.net Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
This commit is contained in:
parent
738a921375
commit
ab0a321b40
|
|
@ -1210,12 +1210,6 @@ macro_rules! dma_write {
|
|||
(@parse [$dma:expr] [$($proj:tt)*] [[$flavor:ident: $index:expr] $($rest:tt)*]) => {
|
||||
$crate::dma_write!(@parse [$dma] [$($proj)* [$flavor: $index]] [$($rest)*])
|
||||
};
|
||||
(@parse [$dma:expr] [$($proj:tt)*] [[$index:expr]? $($rest:tt)*]) => {
|
||||
$crate::dma_write!(@parse [$dma] [$($proj)* [$index]?] [$($rest)*])
|
||||
};
|
||||
(@parse [$dma:expr] [$($proj:tt)*] [[$index:expr] $($rest:tt)*]) => {
|
||||
$crate::dma_write!(@parse [$dma] [$($proj)* [$index]] [$($rest)*])
|
||||
};
|
||||
($dma:expr, $($rest:tt)*) => {
|
||||
$crate::dma_write!(@parse [$dma] [] [$($rest)*])
|
||||
};
|
||||
|
|
|
|||
|
|
@ -351,14 +351,6 @@ macro_rules! project_pointer {
|
|||
$crate::ptr::project!(@gen $ptr, $($rest)*)
|
||||
};
|
||||
|
||||
// For compatibility
|
||||
(@gen $ptr:ident, [$index:expr]? $($rest:tt)*) => {
|
||||
$crate::ptr::project!(@gen $ptr, [try: $index] $($rest)*)
|
||||
};
|
||||
(@gen $ptr:ident, [$index:expr] $($rest:tt)*) => {
|
||||
$crate::ptr::project!(@gen $ptr, [build: $index] $($rest)*)
|
||||
};
|
||||
|
||||
(mut $ptr:expr, $($proj:tt)*) => {{
|
||||
let ptr: *mut _ = $ptr;
|
||||
$crate::ptr::project!(@gen ptr, $($proj)*);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user