1
Fork 0

Auto merge of #99667 - ouz-a:some_branch, r=oli-obk

Optimize `UnDerefer`

Addresses the performance [issues](https://github.com/rust-lang/rust/pull/98145#issuecomment-1183548597) faced here.

r? `@oli-obk`
This commit is contained in:
bors 2022-07-29 07:11:50 +00:00
commit 7dfdd64433
7 changed files with 22 additions and 28 deletions

View file

@ -215,7 +215,7 @@ fn do_mir_borrowck<'a, 'tcx>(
let (move_data, move_errors): (MoveData<'tcx>, Vec<(Place<'tcx>, MoveError<'tcx>)>) =
match MoveData::gather_moves(&body, tcx, param_env) {
Ok(move_data) => (move_data, Vec::new()),
Ok((_, move_data)) => (move_data, Vec::new()),
Err((move_data, move_errors)) => (move_data, move_errors),
};
let promoted_errors = promoted