rust/tests/ui/let_return.stderr

28 lines
698 B
Plaintext
Raw Normal View History

error: returning the result of a let binding from a block. Consider returning the expression directly.
2018-12-09 23:27:19 -06:00
--> $DIR/let_return.rs:16:5
|
2018-12-27 09:57:55 -06:00
LL | x
| ^
|
= note: `-D clippy::let-and-return` implied by `-D warnings`
note: this expression can be directly returned
2018-12-09 23:27:19 -06:00
--> $DIR/let_return.rs:15:13
|
2018-12-27 09:57:55 -06:00
LL | let x = 5;
| ^
error: returning the result of a let binding from a block. Consider returning the expression directly.
2018-12-09 23:27:19 -06:00
--> $DIR/let_return.rs:22:9
|
2018-12-27 09:57:55 -06:00
LL | x
| ^
|
note: this expression can be directly returned
2018-12-09 23:27:19 -06:00
--> $DIR/let_return.rs:21:17
|
2018-12-27 09:57:55 -06:00
LL | let x = 5;
| ^
2018-01-16 10:06:27 -06:00
error: aborting due to 2 previous errors