about summary refs log tree commit diff
path: root/library/core
diff options
context:
space:
mode:
authorMichael Howell <michael@notriddle.com>2022-04-04 17:54:20 -0700
committerMichael Howell <michael@notriddle.com>2022-04-04 17:54:20 -0700
commitdcf7ce8356ce9182d65b0719216ec08db877d5cc (patch)
tree6d8384d6c0487c99774a35721d3a4229170f9127 /library/core
parentbec8dbdb602688d6da4f49b7fdd74226f0f9f04c (diff)
downloadrust-dcf7ce8356ce9182d65b0719216ec08db877d5cc.tar.gz
rust-dcf7ce8356ce9182d65b0719216ec08db877d5cc.zip
Fix bogus tidy errors
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}`",