mirror of
https://github.com/rust-lang/rust-clippy
synced 2025-02-17 06:28:42 +00:00
Auto merge of #7528 - matthiaskrgr:nedlbrw, r=Manishearth
needless_borrow: try to make lint example a bit more illustrating changelog: none
This commit is contained in:
commit
2dbf0c138d
1 changed files with 4 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue