]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/let_and_return.stderr
Merge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyup
[rust.git] / src / tools / clippy / tests / ui / let_and_return.stderr
1 error: returning the result of a `let` binding from a block
2   --> $DIR/let_and_return.rs:7:5
3    |
4 LL |     let x = 5;
5    |     ---------- unnecessary `let` binding
6 LL |     x
7    |     ^
8    |
9    = note: `-D clippy::let-and-return` implied by `-D warnings`
10 help: return the expression directly
11    |
12 LL |     
13 LL |     5
14    |
15
16 error: returning the result of a `let` binding from a block
17   --> $DIR/let_and_return.rs:13:9
18    |
19 LL |         let x = 5;
20    |         ---------- unnecessary `let` binding
21 LL |         x
22    |         ^
23    |
24 help: return the expression directly
25    |
26 LL |         
27 LL |         5
28    |
29
30 error: returning the result of a `let` binding from a block
31   --> $DIR/let_and_return.rs:154:13
32    |
33 LL |             let clone = Arc::clone(&self.foo);
34    |             ---------------------------------- unnecessary `let` binding
35 LL |             clone
36    |             ^^^^^
37    |
38 help: return the expression directly
39    |
40 LL |             
41 LL |             Arc::clone(&self.foo) as _
42    |
43
44 error: aborting due to 3 previous errors
45