]> git.lizzy.rs Git - rust.git/blob - tests/ui/let_return.stderr
Merge pull request #1520 from Manishearth/rustup
[rust.git] / tests / ui / let_return.stderr
1 error: returning the result of a let binding from a block. Consider returning the expression directly.
2   --> $DIR/let_return.rs:10:5
3    |
4 10 |     x
5    |     ^
6    |
7 note: lint level defined here
8   --> $DIR/let_return.rs:5:9
9    |
10 5  | #![deny(let_and_return)]
11    |         ^^^^^^^^^^^^^^
12 note: this expression can be directly returned
13   --> $DIR/let_return.rs:9:13
14    |
15 9  |     let x = 5;
16    |             ^
17
18 error: returning the result of a let binding from a block. Consider returning the expression directly.
19   --> $DIR/let_return.rs:16:9
20    |
21 16 |         x
22    |         ^
23    |
24 note: this expression can be directly returned
25   --> $DIR/let_return.rs:15:17
26    |
27 15 |         let x = 5;
28    |                 ^
29
30 error: aborting due to 2 previous errors
31