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
-Wclippy::no_mangle_with_rust_abi \
460
460
-Wclippy::undocumented_unsafe_blocks \
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 @@ -341,7 +341,7 @@ impl<T: 'static> ForeignOwnable for Arc<T> {
341
341
}
342
342
343
343
unsafe fn borrow < ' a > ( ptr : * const core:: ffi:: c_void ) -> ArcBorrow < ' a , T > {
344
- // SAFETY: By the safety requirement of this function, we know that `ptr` came from
344
+ // By the safety requirement of this function, we know that `ptr` came from
345
345
// a previous call to `Arc::into_foreign`.
346
346
let inner = NonNull :: new ( ptr as * mut ArcInner < T > ) . unwrap ( ) ;
347
347
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