File tree Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -461,6 +461,7 @@ export rust_common_flags := --edition=2021 \
461
461
-Aclippy::needless_lifetimes \
462
462
-Wclippy::no_mangle_with_rust_abi \
463
463
-Wclippy::undocumented_unsafe_blocks \
464
+ -Wclippy::unnecessary_safety_comment \
464
465
-Wrustdoc::missing_crate_level_docs
465
466
466
467
KBUILD_HOSTCFLAGS := $(KBUILD_USERHOSTCFLAGS ) $(HOST_LFS_CFLAGS ) \
Original file line number Diff line number Diff line change @@ -338,7 +338,7 @@ impl<T: 'static> ForeignOwnable for Arc<T> {
338
338
}
339
339
340
340
unsafe fn borrow < ' a > ( ptr : * const core:: ffi:: c_void ) -> ArcBorrow < ' a , T > {
341
- // SAFETY: By the safety requirement of this function, we know that `ptr` came from
341
+ // By the safety requirement of this function, we know that `ptr` came from
342
342
// a previous call to `Arc::into_foreign`.
343
343
let inner = NonNull :: new ( ptr as * mut ArcInner < T > ) . unwrap ( ) ;
344
344
Original file line number Diff line number Diff line change @@ -526,7 +526,7 @@ where
526
526
T : HasWork < T , ID > ,
527
527
{
528
528
unsafe extern "C" fn run ( ptr : * mut bindings:: work_struct ) {
529
- // SAFETY: The `__enqueue` method always uses a `work_struct` stored in a `Work<T, ID>`.
529
+ // The `__enqueue` method always uses a `work_struct` stored in a `Work<T, ID>`.
530
530
let ptr = ptr as * mut Work < T , ID > ;
531
531
// SAFETY: This computes the pointer that `__enqueue` got from `Arc::into_raw`.
532
532
let ptr = unsafe { T :: work_container_of ( ptr) } ;
@@ -573,7 +573,7 @@ where
573
573
T : HasWork < T , ID > ,
574
574
{
575
575
unsafe extern "C" fn run ( ptr : * mut bindings:: work_struct ) {
576
- // SAFETY: The `__enqueue` method always uses a `work_struct` stored in a `Work<T, ID>`.
576
+ // The `__enqueue` method always uses a `work_struct` stored in a `Work<T, ID>`.
577
577
let ptr = ptr as * mut Work < T , ID > ;
578
578
// SAFETY: This computes the pointer that `__enqueue` got from `Arc::into_raw`.
579
579
let ptr = unsafe { T :: work_container_of ( ptr) } ;
You can’t perform that action at this time.
0 commit comments