]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/nll/issue-54556-niconii.stderr
New upstream version 1.49.0+dfsg1
[rustc.git] / src / test / ui / nll / issue-54556-niconii.stderr
index 40cd04de5ecc14919d9525590538e2d4fb01b5ce..b4791fd22b4ad6c6d7bafead9d497aa537f5db67 100644 (file)
@@ -13,7 +13,10 @@ LL | }
    | `counter` dropped here while still borrowed
    | ... and the borrow might be used here, when that temporary is dropped and runs the destructor for type `std::result::Result<MutexGuard<'_>, ()>`
    |
-   = note: The temporary is part of an expression at the end of a block. Consider adding semicolon after the expression so its temporaries are dropped sooner, before the local variables declared by the block are dropped.
+help: consider adding semicolon after the expression so its temporaries are dropped sooner, before the local variables declared by the block are dropped
+   |
+LL |     if let Ok(_) = counter.lock() { };
+   |                                      ^
 
 error: aborting due to previous error