Fix some additional clippy warnings

This commit is contained in:
Andrew Brown
2020-01-09 11:46:21 -08:00
parent 71914c7668
commit e8c3302bc5
4 changed files with 8 additions and 4 deletions

View File

@@ -124,7 +124,8 @@ pub fn do_simple_gvn(func: &mut Function, domtree: &mut DominatorTree) {
use crate::scoped_hash_map::Entry::*;
match visible_values.entry(key) {
Occupied(entry) => {
debug_assert!(domtree.dominates(*entry.get(), inst, &func.layout));
let layout = &func.layout;
debug_assert!(domtree.dominates(*entry.get(), inst, layout));
// If the redundant instruction is representing the current
// scope, pick a new representative.
let old = scope_stack.last_mut().unwrap();