simplify MoveDataBuilder::move_path_for with new UnDerefer::co_iter_projections - #160784
simplify MoveDataBuilder::move_path_for with new UnDerefer::co_iter_projections#160784beepster4096 wants to merge 2 commits into
MoveDataBuilder::move_path_for with new UnDerefer::co_iter_projections#160784Conversation
this resolves some borrowck pains when using it
|
r? @oli-obk rustbot has assigned @oli-obk. Use Why was this reviewer chosen?The reviewer was selected based on:
|
8e94571 to
4dd8d59
Compare
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…r=<try> simplify `MoveDataBuilder::move_path_for` with new `UnDerefer::co_iter_projections`
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (4b2ccee): comparison URL. Overall result: ❌ regressions - please read:Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf. Next, please: If you can, justify the regressions found in this try perf run in writing along with @bors rollup=never rustc-perf Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)This perf run didn't have relevant results for this metric. CyclesResults (primary -4.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 455.615s -> 459.565s (0.87%) |
so 😆 are we closing it or should I actually review it? |
|
Oh yeah, sorry. Just gonna close it for now. |
Split off an old design of #160780
MoveDataBuilder::move_path_forhas been kind of messy sinceDereferwas moved before drop elaboration because of borrowck problems with theUnDerefer::iter_projectionsiterator. This PR addsco_iter_projections, returning aProjectionCoroutinewhich takes a&UnDereferfor each iteration. Now,move_path_fordoesn't have an outlined copy ofadd_move_pathanymore which is a lot nicer.Since my other PR doesn't need this anymore, if its a perf regression I'll probably just close the PR.
Issues:
co_iter_projectionsis the best namePossible alternatives:
mem::takeonself.data.rev_lookup.un_derefer?