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 @@ -458,6 +458,7 @@ export rust_common_flags := --edition=2021 \
458
458
-Wclippy::needless_continue \
459
459
-Aclippy::needless_lifetimes \
460
460
-Wclippy::no_mangle_with_rust_abi \
461
+ -Wclippy::unnecessary_safety_comment \
461
462
-Wrustdoc::missing_crate_level_docs
462
463
463
464
KBUILD_HOSTCFLAGS := $(KBUILD_USERHOSTCFLAGS ) $(HOST_LFS_CFLAGS ) \
Original file line number Diff line number Diff line change @@ -359,7 +359,7 @@ impl<T: 'static> ForeignOwnable for Arc<T> {
359
359
}
360
360
361
361
unsafe fn borrow < ' a > ( ptr : * const core:: ffi:: c_void ) -> ArcBorrow < ' a , T > {
362
- // SAFETY: By the safety requirement of this function, we know that `ptr` came from
362
+ // By the safety requirement of this function, we know that `ptr` came from
363
363
// a previous call to `Arc::into_foreign`.
364
364
let inner = NonNull :: new ( ptr as * mut ArcInner < T > ) . unwrap ( ) ;
365
365
Original file line number Diff line number Diff line change @@ -525,7 +525,7 @@ where
525
525
T : HasWork < T , ID > ,
526
526
{
527
527
unsafe extern "C" fn run ( ptr : * mut bindings:: work_struct ) {
528
- // SAFETY: The `__enqueue` method always uses a `work_struct` stored in a `Work<T, ID>`.
528
+ // The `__enqueue` method always uses a `work_struct` stored in a `Work<T, ID>`.
529
529
let ptr = ptr as * mut Work < T , ID > ;
530
530
// SAFETY: This computes the pointer that `__enqueue` got from `Arc::into_raw`.
531
531
let ptr = unsafe { T :: work_container_of ( ptr) } ;
@@ -570,7 +570,7 @@ where
570
570
T : HasWork < T , ID > ,
571
571
{
572
572
unsafe extern "C" fn run ( ptr : * mut bindings:: work_struct ) {
573
- // SAFETY: The `__enqueue` method always uses a `work_struct` stored in a `Work<T, ID>`.
573
+ // The `__enqueue` method always uses a `work_struct` stored in a `Work<T, ID>`.
574
574
let ptr = ptr as * mut Work < T , ID > ;
575
575
// SAFETY: This computes the pointer that `__enqueue` got from `Arc::into_raw`.
576
576
let ptr = unsafe { T :: work_container_of ( ptr) } ;
You can’t perform that action at this time.
0 commit comments