Skip to content

Commit

Permalink
Bring up Rust lang rust-lang#37612 as a known problem for let_and_return
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcusGrass committed Jun 1, 2023
1 parent 652b4c7 commit 62eb4e7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions clippy_lints/src/returns.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 62eb4e7

Please sign in to comment.