rust/tests/ui/let_return.stderr

28 lines
689 B
Plaintext
Raw Normal View History

error: returning the result of a let binding from a block. Consider returning the expression directly.
2017-08-01 10:54:21 -05:00
--> $DIR/let_return.rs:10:5
|
2017-02-08 07:58:07 -06:00
10 | x
| ^
|
= note: `-D let-and-return` implied by `-D warnings`
note: this expression can be directly returned
2017-08-01 10:54:21 -05:00
--> $DIR/let_return.rs:9:13
|
2017-02-08 07:58:07 -06:00
9 | let x = 5;
| ^
error: returning the result of a let binding from a block. Consider returning the expression directly.
2017-08-01 10:54:21 -05:00
--> $DIR/let_return.rs:16:9
|
2017-02-08 07:58:07 -06:00
16 | x
| ^
|
note: this expression can be directly returned
2017-08-01 10:54:21 -05:00
--> $DIR/let_return.rs:15:17
|
2017-02-08 07:58:07 -06:00
15 | let x = 5;
| ^
2018-01-16 10:06:27 -06:00
error: aborting due to 2 previous errors