Commit graph

5 commits

Author SHA1 Message Date
Jason Newcomb
5f861ee1ae Addition manual_map test for unsafe blocks 2021-11-17 10:39:53 -05:00
Jason Newcomb
80a263d469 Fix manual_map suggestion when used with unsafe functions and unsafe blocks. 2021-11-12 19:12:17 -05:00
Jason Newcomb
9500974bdb
Fix tracking of which locals would need to be captured in a closure.
* Captures by sub closures are now considered
* Copy types are correctly borrowed by reference when their value is used
* Fields are no longer automatically borrowed by value
* Bindings in `match` and `let` patterns are now checked to determine how a local is captured
2021-08-14 19:49:57 -04:00
Jason Newcomb
251dd30d77
Improve manual_map
In some cases check if a borrow made in the scrutinee expression would prevent creating the closure used by `map`
2021-08-14 19:49:54 -04:00
Jason Newcomb
4838c78ba4
Improve manual_map and map_entry
Locals which can be partially moved created within the to-be-created closure shouldn't block the use of a closure
2021-08-14 19:49:45 -04:00