You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: false positive is only emitted when #[derive(Debug)] attribute is present:
#[derive(Debug)] // must be present to get false positive
pub struct Crowd<'a> {
people: &'a [usize],
}
gives
Compiling playground v0.0.1 (file:///playground)
warning: this pattern creates a reference to a reference
--> src/main.rs:7:5
|
7 | people: &'a [usize],
| ^^^^^^^^^^^^^^^^^^^ help: change this to: `people: &'a [usize]`
|
note: lint level defined here
--> src/main.rs:2:9
|
2 | #![warn(needless_borrow)]
| ^^^^^^^^^^^^^^^
= help: for further information visit https://rust-lang-nursery.github.io/rust-clippy/v0.0.195/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> src/main.rs:7:5
|
7 | people: &'a [usize],
| ^^^^^^^^^^^^^^^^^^^ help: change this to: `people: &'a [usize]`
|
= help: for further information visit https://rust-lang-nursery.github.io/rust-clippy/v0.0.195/index.html#needless_borrow
Finished dev [unoptimized + debuginfo] target(s) in 0.66 secs
Note: false positive is only emitted when
#[derive(Debug)]
attribute is present:gives
playground example
The text was updated successfully, but these errors were encountered: