]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/let_return.stderr
Auto merge of #4478 - tsurai:master, r=flip1995
[rust.git] / tests / ui / let_return.stderr
index cdd4b6bd5379383c74ed6ba40a8283eda8cde196..319f45c0a8a0b071ce168aac260ac0b85bc429b4 100644 (file)
@@ -1,27 +1,30 @@
-error: returning the result of a let binding from a block. Consider returning the expression directly.
-  --> $DIR/let_return.rs:20:5
+error: returning the result of a let binding from a block
+  --> $DIR/let_return.rs:7:5
    |
-20 |     x
+LL |     let x = 5;
+   |     ---------- unnecessary let binding
+LL |     x
    |     ^
    |
    = note: `-D clippy::let-and-return` implied by `-D warnings`
-note: this expression can be directly returned
-  --> $DIR/let_return.rs:19:13
+help: return the expression directly
+   |
+LL |     
+LL |     5
    |
-19 |     let x = 5;
-   |             ^
 
-error: returning the result of a let binding from a block. Consider returning the expression directly.
-  --> $DIR/let_return.rs:26:9
+error: returning the result of a let binding from a block
+  --> $DIR/let_return.rs:13:9
    |
-26 |         x
+LL |         let x = 5;
+   |         ---------- unnecessary let binding
+LL |         x
    |         ^
+help: return the expression directly
    |
-note: this expression can be directly returned
-  --> $DIR/let_return.rs:25:17
+LL |         
+LL |         5
    |
-25 |         let x = 5;
-   |                 ^
 
 error: aborting due to 2 previous errors