Fix example

This commit is contained in:
alexey semenyuk 2022-08-16 12:50:53 +03:00 committed by GitHub
parent a427b12803
commit 9e9b3ddf69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,18 +30,12 @@ declare_clippy_lint! {
///
/// ### Example
/// ```rust
/// # fn foo(bar: usize) {}
/// let x = Box::new(1);
/// foo(*x);
/// println!("{}", *x);
/// fn foo(x: Box<u32>) {}
/// ```
///
/// Use instead:
/// ```rust
/// # fn foo(bar: usize) {}
/// let x = 1;
/// foo(x);
/// println!("{}", x);
/// fn foo(x: u32) {}
/// ```
#[clippy::version = "pre 1.29.0"]
pub BOXED_LOCAL,