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:
commit
048e4d004a
1 changed files with 2 additions and 8 deletions
|
@ -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,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue