rust/clippy_lints
bors c419d0a8b5 Auto merge of #9136 - smoelius:enhance-needless-borrow, r=Jarcho
Enhance `needless_borrow` to consider trait implementations

The proposed enhancement causes `needless_borrow` to suggest removing `&` from `&e` when `&e` is an argument position requiring trait implementations, and `e` implements the required traits. Example:
```
error: the borrowed expression implements the required traits
  --> $DIR/needless_borrow.rs:131:51
   |
LL |     let _ = std::process::Command::new("ls").args(&["-a", "-l"]).status().unwrap();
   |                                                   ^^^^^^^^^^^^^ help: change this to: `["-a", "-l"]`
```

r? `@Jarcho`

changelog: Enhance `needless_borrow` to consider trait implementations
2022-08-18 15:57:37 +00:00
..
src Auto merge of #9136 - smoelius:enhance-needless-borrow, r=Jarcho 2022-08-18 15:57:37 +00:00
Cargo.toml Bump Clippy version -> 0.1.65 2022-08-11 19:26:38 +02:00
README.md

This crate contains Clippy lints. For the main crate, check GitHub.