Skip to content

Commit

Permalink
Auto merge of rust-lang#9340 - alex-semenyuk:box_t, r=dswij
Browse files Browse the repository at this point in the history
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
  • Loading branch information
bors committed Aug 16, 2022
2 parents 86ac6e8 + 9e9b3dd commit 048e4d0
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions clippy_lints/src/escape.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 048e4d0

Please sign in to comment.