Add a link to the Clippy's false positive bug around boxed_local

This commit is contained in:
Dale Wijnand 2018-07-23 08:41:55 +01:00
parent 8dc00d45c1
commit 09111134f9
No known key found for this signature in database
GPG Key ID: 4F256E3D151DF5EF

View File

@ -19,7 +19,8 @@ trait FnBox<A, R> {
} }
impl<A, R, F: FnOnce(A) -> R> FnBox<A, R> for F { impl<A, R, F: FnOnce(A) -> R> FnBox<A, R> for F {
#[cfg_attr(feature = "cargo-clippy", allow(boxed_local))] // The use of Box is intentional here // False positive: https://github.com/rust-lang-nursery/rust-clippy/issues/1123
#[cfg_attr(feature = "cargo-clippy", allow(boxed_local))]
fn call_box(self: Box<F>, a: A) -> R { fn call_box(self: Box<F>, a: A) -> R {
(*self)(a) (*self)(a)
} }