Skip to content

Commit 048e4d0

Browse files
committed
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
2 parents 86ac6e8 + 9e9b3dd commit 048e4d0

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

clippy_lints/src/escape.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,12 @@ declare_clippy_lint! {
3030
///
3131
/// ### Example
3232
/// ```rust
33-
/// # fn foo(bar: usize) {}
34-
/// let x = Box::new(1);
35-
/// foo(*x);
36-
/// println!("{}", *x);
33+
/// fn foo(x: Box<u32>) {}
3734
/// ```
3835
///
3936
/// Use instead:
4037
/// ```rust
41-
/// # fn foo(bar: usize) {}
42-
/// let x = 1;
43-
/// foo(x);
44-
/// println!("{}", x);
38+
/// fn foo(x: u32) {}
4539
/// ```
4640
#[clippy::version = "pre 1.29.0"]
4741
pub BOXED_LOCAL,

0 commit comments

Comments
 (0)