mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-28 07:30:57 +00:00
46 lines
957 B
Text
46 lines
957 B
Text
|
error: returning the result of a `let` binding from a block
|
||
|
--> $DIR/ice-8850.rs:4:5
|
||
|
|
|
||
|
LL | let res = FN() + 1;
|
||
|
| ------------------- unnecessary `let` binding
|
||
|
LL | res
|
||
|
| ^^^
|
||
|
|
|
||
|
= note: `-D clippy::let-and-return` implied by `-D warnings`
|
||
|
help: return the expression directly
|
||
|
|
|
||
|
LL ~
|
||
|
LL ~ FN() + 1
|
||
|
|
|
||
|
|
||
|
error: returning the result of a `let` binding from a block
|
||
|
--> $DIR/ice-8850.rs:10:5
|
||
|
|
|
||
|
LL | let res = FN() + 1;
|
||
|
| ------------------- unnecessary `let` binding
|
||
|
LL | res
|
||
|
| ^^^
|
||
|
|
|
||
|
help: return the expression directly
|
||
|
|
|
||
|
LL ~
|
||
|
LL ~ FN() + 1
|
||
|
|
|
||
|
|
||
|
error: returning the result of a `let` binding from a block
|
||
|
--> $DIR/ice-8850.rs:24:5
|
||
|
|
|
||
|
LL | let res = FN() + 1;
|
||
|
| ------------------- unnecessary `let` binding
|
||
|
LL | res
|
||
|
| ^^^
|
||
|
|
|
||
|
help: return the expression directly
|
||
|
|
|
||
|
LL ~
|
||
|
LL ~ FN() + 1
|
||
|
|
|
||
|
|
||
|
error: aborting due to 3 previous errors
|
||
|
|