]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/tests/ui/let_and_return.stderr
Merge branch 'master' into hooks
[rust.git] / src / tools / clippy / tests / ui / let_and_return.stderr
index eacf948b3927a5ee28cd67b3756941d811868764..fe878e5f20601ff68d80908aaf95711f52463d9e 100644 (file)
@@ -27,5 +27,19 @@ LL |
 LL |         5
    |
 
-error: aborting due to 2 previous errors
+error: returning the result of a `let` binding from a block
+  --> $DIR/let_and_return.rs:154:13
+   |
+LL |             let clone = Arc::clone(&self.foo);
+   |             ---------------------------------- unnecessary `let` binding
+LL |             clone
+   |             ^^^^^
+   |
+help: return the expression directly
+   |
+LL |             
+LL |             Arc::clone(&self.foo) as _
+   |
+
+error: aborting due to 3 previous errors