Skip to content

Commit

Permalink
Fix bogus tidy errors
Browse files Browse the repository at this point in the history
  • Loading branch information
notriddle committed Apr 5, 2022
1 parent bec8dbd commit dcf7ce8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions library/core/src/ops/function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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}`",
Expand Down Expand Up @@ -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}`",
Expand Down Expand Up @@ -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}`",
Expand Down

0 comments on commit dcf7ce8

Please sign in to comment.