From dcf7ce8356ce9182d65b0719216ec08db877d5cc Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Mon, 4 Apr 2022 17:54:20 -0700 Subject: [PATCH] Fix bogus tidy errors --- library/core/src/ops/function.rs | 3 +++ 1 file changed, 3 insertions(+) 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: FnMut { ), 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: FnOnce { ), 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}`",