rust/tests/ui/let_return.stderr

32 lines
643 B
Plaintext
Raw Normal View History

2020-01-06 00:36:33 -06:00
error: returning the result of a `let` binding from a block
--> $DIR/let_return.rs:7:5
|
LL | let x = 5;
2020-01-06 00:36:33 -06:00
| ---------- unnecessary `let` binding
2018-12-27 09:57:55 -06:00
LL | x
| ^
|
= note: `-D clippy::let-and-return` implied by `-D warnings`
help: return the expression directly
|
LL |
LL | 5
|
2020-01-06 00:36:33 -06:00
error: returning the result of a `let` binding from a block
--> $DIR/let_return.rs:13:9
|
LL | let x = 5;
2020-01-06 00:36:33 -06:00
| ---------- unnecessary `let` binding
2018-12-27 09:57:55 -06:00
LL | x
| ^
2019-10-26 14:53:42 -05:00
|
help: return the expression directly
|
LL |
LL | 5
|
2018-01-16 10:06:27 -06:00
error: aborting due to 2 previous errors