-error: returning the result of a let binding from a block. Consider returning the expression directly.
- --> $DIR/let_return.rs:16:5
+error: returning the result of a let binding from a block
+ --> $DIR/let_return.rs:7:5
|
-16 | x
+LL | let x = 5;
+ | ---------- unnecessary let binding
+LL | x
| ^
|
= note: `-D clippy::let-and-return` implied by `-D warnings`
-note: this expression can be directly returned
- --> $DIR/let_return.rs:15:13
+help: return the expression directly
+ |
+LL |
+LL | 5
|
-15 | let x = 5;
- | ^
-error: returning the result of a let binding from a block. Consider returning the expression directly.
- --> $DIR/let_return.rs:22:9
+error: returning the result of a let binding from a block
+ --> $DIR/let_return.rs:13:9
|
-22 | x
+LL | let x = 5;
+ | ---------- unnecessary let binding
+LL | x
| ^
+help: return the expression directly
|
-note: this expression can be directly returned
- --> $DIR/let_return.rs:21:17
+LL |
+LL | 5
|
-21 | let x = 5;
- | ^
error: aborting due to 2 previous errors