-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-NLLArea: Non-lexical lifetimes (NLL)Area: Non-lexical lifetimes (NLL)NLL-performantWorking towards the "performance is good" goalWorking towards the "performance is good" goalT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Milestone
Description
If I am not mistaken, the move_outs
dataflow computation is only used for error reporting. However, we do the computation unconditionally here:
rust/src/librustc_mir/borrow_check/mod.rs
Lines 188 to 196 in d5a448b
let flow_move_outs = FlowAtLocation::new(do_dataflow( | |
tcx, | |
mir, | |
id, | |
&attributes, | |
&dead_unwinds, | |
MovingOutStatements::new(tcx, mir, &mdpe), | |
|bd, i| DebugFormatted::new(&bd.move_data().moves[i]), | |
)); |
Perhaps it would be more efficient to wait and do it only if we find an error? Or, maybe even better, not do it at all but instead -- when we have an error -- just do a backwards DFS or something? i.e., just do it for the specific error path?
cc @pnkfelix
matthewjasper
Metadata
Metadata
Assignees
Labels
A-NLLArea: Non-lexical lifetimes (NLL)Area: Non-lexical lifetimes (NLL)NLL-performantWorking towards the "performance is good" goalWorking towards the "performance is good" goalT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.