From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: rust: ptr: remove implicit index projection syntax Date: Thu, 04 Jun 2026 12:43:27 +1000 Message-ID: In-Reply-To: <20260602-projection-syntax-rework-v2-6-6989470f5440@garyguo.net> References: <20260602-projection-syntax-rework-v2-0-6989470f5440@garyguo.net> <20260602-projection-syntax-rework-v2-6-6989470f5440@garyguo.net> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Patch Review Removes the backward-compatibility shims added in patch 3, now that all callers have been converted: >From `projection.rs`: ```rust - // 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)*) - }; ``` And from `dma.rs`, the corresponding old-syntax parse arms in `dma_write!`: ```rust - (@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)*]) - }; ``` Clean removal. The `dma_read!` macro (not shown in the diff) presumably also had similar old-syntax arms -- it's worth verifying that `dma_read!` is also cleaned up. Looking at the diff for `dma.rs` in this patch, only `dma_write!` is modified. The `dma_read!` macro delegates to `project_pointer!` internally, so it would go through `ptr::project!(@gen ...)` which no longer has the old-syntax arms. If `dma_read!` had its own parsing arms for `[$index]?` and `[$index]`, those should be removed too. However, looking at the overall diffstat, the `dma_read!` macro likely delegates parsing to `project_pointer!` directly (unlike `dma_write!` which has its own `@parse` arms), so this may be correct as-is. Already has Reviewed-by from Alexandre, Andreas, and Alice. No issues with the removal itself. --- Generated by Claude Code Patch Reviewer