about summary refs log tree commit diff
path: root/library/core
diff options
context:
space:
mode:
Diffstat (limited to 'library/core')
-rw-r--r--library/core/src/ops/function.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/library/core/src/ops/function.rs b/library/core/src/ops/function.rs
index a7b28471bfe..19918e0dcea 100644
--- a/library/core/src/ops/function.rs
+++ b/library/core/src/ops/function.rs
@@ -61,6 +61,7 @@
     ),
     on(
         _Self = "unsafe fn",
+        // SAFETY: tidy is not smart enough to tell that the below unsafe block is a string
         note = "unsafe functions must be wrapped in closures: `|| unsafe {{ /* code */ }}`"
     ),
     message = "expected a `{Fn}<{Args}>` closure, found `{Self}`",
@@ -145,6 +146,7 @@ pub trait Fn<Args>: FnMut<Args> {
     ),
     on(
         _Self = "unsafe fn",
+        // SAFETY: tidy is not smart enough to tell that the below unsafe block is a string
         note = "unsafe functions must be wrapped in closures: `|| unsafe {{ /* code */ }}`"
     ),
     message = "expected a `{FnMut}<{Args}>` closure, found `{Self}`",
@@ -221,6 +223,7 @@ pub trait FnMut<Args>: FnOnce<Args> {
     ),
     on(
         _Self = "unsafe fn",
+        // SAFETY: tidy is not smart enough to tell that the below unsafe block is a string
         note = "unsafe functions must be wrapped in closures: `|| unsafe {{ /* code */ }}`"
     ),
     message = "expected a `{FnOnce}<{Args}>` closure, found `{Self}`",