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: Add missing SAFETY documentation for `ARef` example Date: Mon, 23 Feb 2026 06:08:50 +1000 Message-ID: In-Reply-To: <20260220-unique-ref-v15-3-893ed86b06cc@kernel.org> References: <20260220-unique-ref-v15-0-893ed86b06cc@kernel.org> <20260220-unique-ref-v15-3-893ed86b06cc@kernel.org> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Patch Review > - /// use core::ptr::NonNull; > - /// use kernel::sync::aref::{ARef, RefCounted}; > + /// # use core::ptr::NonNull; > + /// # use kernel::sync::aref::{ARef, RefCounted}; As Alice noted, changing imports from visible to hidden (`#`) is a separate concern from fixing the SAFETY comment and arguably doesn't belong in this commit. If hiding them, the blank line after should also be removed. > + /// // SAFETY: The `RefCounted` implementation for `Empty` does not count references and never > + /// // frees the underlying object. Thus we can act as owning an increment on the refcount for > + /// // the object that we pass to the newly created `ARef`. The SAFETY justification is reasonable -- a no-op refcount implementation is trivially safe. > + /// // SAFETY: We keep `data` around longer than the `ARef`. Concise and correct. --- Generated by Claude Code Patch Reviewer