diff options
| author | bors <bors@rust-lang.org> | 2021-08-04 09:17:10 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-08-04 09:17:10 +0000 |
| commit | 2dbf0c138de34d7805b9291705f2e2361324f219 (patch) | |
| tree | 9bed9a0d91761aab3e37ce257cbce0f89badccc8 | |
| parent | 85569106a4af947e8f12380e4697931438b61f4d (diff) | |
| parent | 54c41c049cbfdd159a713ba4ac87056f6b5c7488 (diff) | |
| download | rust-2dbf0c138de34d7805b9291705f2e2361324f219.tar.gz rust-2dbf0c138de34d7805b9291705f2e2361324f219.zip | |
Auto merge of #7528 - matthiaskrgr:nedlbrw, r=Manishearth
needless_borrow: try to make lint example a bit more illustrating changelog: none
| -rw-r--r-- | clippy_lints/src/needless_borrow.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clippy_lints/src/needless_borrow.rs b/clippy_lints/src/needless_borrow.rs index 3f0b23ee4d3..ba8f9446af8 100644 --- a/clippy_lints/src/needless_borrow.rs +++ b/clippy_lints/src/needless_borrow.rs @@ -27,11 +27,15 @@ declare_clippy_lint! { /// /// ### Example /// ```rust + /// fn fun(_a: &i32) {} + /// /// // Bad /// let x: &i32 = &&&&&&5; + /// fun(&x); /// /// // Good /// let x: &i32 = &5; + /// fun(x); /// ``` pub NEEDLESS_BORROW, style, |
