diff options
| author | MarcusGrass <marcus.grass@protonmail.com> | 2023-06-01 15:53:20 +0200 |
|---|---|---|
| committer | MarcusGrass <marcus.grass@protonmail.com> | 2023-06-01 16:10:57 +0200 |
| commit | 62eb4e7d7b5568bfcf9e82a61bf3a60aaa739548 (patch) | |
| tree | b80ab2f68fb39da9b56357f5aea0790199284305 | |
| parent | 652b4c720dd613270f4755c39fa77d4d686187be (diff) | |
| download | rust-62eb4e7d7b5568bfcf9e82a61bf3a60aaa739548.tar.gz rust-62eb4e7d7b5568bfcf9e82a61bf3a60aaa739548.zip | |
Bring up Rust lang #37612 as a known problem for let_and_return
| -rw-r--r-- | clippy_lints/src/returns.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clippy_lints/src/returns.rs b/clippy_lints/src/returns.rs index 631ecf1428d..92913ddc4aa 100644 --- a/clippy_lints/src/returns.rs +++ b/clippy_lints/src/returns.rs @@ -25,6 +25,12 @@ declare_clippy_lint! { /// It is just extraneous code. Remove it to make your code /// more rusty. /// + /// ### Known problems + /// In the case of some temporaries, e.g. locks, eliding the variable binding could lead + /// to deadlocks. See [rust-lang issue 37612](https://github.com/rust-lang/rust/issues/37612). + /// This could become relevant if the code is later changed to use the code that would have been + /// bound without first assigning it to a let-binding. + /// /// ### Example /// ```rust /// fn foo() -> String { |
