Bring up Rust lang #37612 as a known problem for let_and_return
This commit is contained in:
parent
652b4c720d
commit
62eb4e7d7b
@ -25,6 +25,12 @@
|
||||
/// 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 {
|
||||
|
Loading…
Reference in New Issue
Block a user