Closed
Description
Clippy suggests replacing variable start
with start
and end
with end
used in range syntax.
I guess that is because the syntax is syntactic sugar and structs resulting from desugaring have fields with these names.
IMHO we should make an exception to treat these range syntax.
warning: redundant field names in struct initialization
--> src/main.rs:3:13
|
3 | let _ = start..;
| ^^^^^ help: replace it with: `start`
|
= note: #[warn(redundant_field_names)] on by default
= help: for further information visit https://rust-lang-nursery.github.io/rust-clippy/v0.0.187/index.html#redundant_field_names
warning: redundant field names in struct initialization
--> src/main.rs:6:15
|
6 | let _ = ..end;
| ^^^ help: replace it with: `end`
|
= help: for further information visit https://rust-lang-nursery.github.io/rust-clippy/v0.0.187/index.html#redundant_field_names
warning: redundant field names in struct initialization
--> src/main.rs:8:13
|
8 | let _ = start..end;
| ^^^^^ help: replace it with: `start`
|
= help: for further information visit https://rust-lang-nursery.github.io/rust-clippy/v0.0.187/index.html#redundant_field_names
warning: redundant field names in struct initialization
--> src/main.rs:8:20
|
8 | let _ = start..end;
| ^^^ help: replace it with: `end`
|
= help: for further information visit https://rust-lang-nursery.github.io/rust-clippy/v0.0.187/index.html#redundant_field_names
Metadata
Metadata
Assignees
Labels
No labels