Skip to content

Commit dcf7ce8

Browse files
committed
Fix bogus tidy errors
1 parent bec8dbd commit dcf7ce8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

library/core/src/ops/function.rs

+3
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
),
6262
on(
6363
_Self = "unsafe fn",
64+
// SAFETY: tidy is not smart enough to tell that the below unsafe block is a string
6465
note = "unsafe functions must be wrapped in closures: `|| unsafe {{ /* code */ }}`"
6566
),
6667
message = "expected a `{Fn}<{Args}>` closure, found `{Self}`",
@@ -145,6 +146,7 @@ pub trait Fn<Args>: FnMut<Args> {
145146
),
146147
on(
147148
_Self = "unsafe fn",
149+
// SAFETY: tidy is not smart enough to tell that the below unsafe block is a string
148150
note = "unsafe functions must be wrapped in closures: `|| unsafe {{ /* code */ }}`"
149151
),
150152
message = "expected a `{FnMut}<{Args}>` closure, found `{Self}`",
@@ -221,6 +223,7 @@ pub trait FnMut<Args>: FnOnce<Args> {
221223
),
222224
on(
223225
_Self = "unsafe fn",
226+
// SAFETY: tidy is not smart enough to tell that the below unsafe block is a string
224227
note = "unsafe functions must be wrapped in closures: `|| unsafe {{ /* code */ }}`"
225228
),
226229
message = "expected a `{FnOnce}<{Args}>` closure, found `{Self}`",

0 commit comments

Comments
 (0)