1
Fork 0

Auto merge of #9340 - alex-semenyuk:box_t, r=dswij

Fix example

The example didn't show the actual problem [playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=9d0e0727ca5bbd854767f50da693ca0f)
changelog: none
This commit is contained in:
bors 2022-08-16 13:27:10 +00:00
commit 048e4d004a

View file

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