Chapter 13 closure examples tells that all the sample closures scenario are valid but in actual rust compiler reports an error.
jpmateo022 opened this issue · comments
JP commented
Carol (Nichols || Goulding) commented
This closure definition syntax is valid if you call the closure so that Rust can infer the types involved. This is mentioned in this part of the text:
Lines 135 to 137 in 71352de
Additionally, please follow the issue template next time: if you had searched for add_one_v3
, you would have found this duplicate issue that points to the text added that addresses this point explicitly.