mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-19 01:24:05 +00:00
effea41fe4
Label the unnecessary let binding and convert the note to structured suggestion.
17 lines
401 B
Text
17 lines
401 B
Text
error: returning the result of a let binding from a block
|
|
--> $DIR/matches.rs:9:13
|
|
|
|
|
LL | let x = 3;
|
|
| ---------- unnecessary let binding
|
|
LL | x
|
|
| ^
|
|
|
|
|
= note: `-D clippy::let-and-return` implied by `-D warnings`
|
|
help: return the expression directly
|
|
|
|
|
LL |
|
|
LL | 3
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|