Fix remaining clippy warnings (#1340)
* clippy: allow complex encoding function * clippy: remove unnecessary main() function in doctest * clippy: remove redundant `Type` suffix on LaneType enum variants * clippy: ignore incorrect debug_assert_with_mut_call warning * clippy: fix FDE clippy warnings
This commit is contained in:
committed by
Yury Delendik
parent
435fc71d68
commit
e1d513ab4b
@@ -124,8 +124,13 @@ pub fn do_simple_gvn(func: &mut Function, domtree: &mut DominatorTree) {
|
||||
use crate::scoped_hash_map::Entry::*;
|
||||
match visible_values.entry(key) {
|
||||
Occupied(entry) => {
|
||||
let layout = &func.layout;
|
||||
debug_assert!(domtree.dominates(*entry.get(), inst, layout));
|
||||
#[allow(clippy::debug_assert_with_mut_call)]
|
||||
{
|
||||
// Clippy incorrectly believes `&func.layout` should not be used here:
|
||||
// https://github.com/rust-lang/rust-clippy/issues/4737
|
||||
debug_assert!(domtree.dominates(*entry.get(), inst, &func.layout));
|
||||
}
|
||||
|
||||
// If the redundant instruction is representing the current
|
||||
// scope, pick a new representative.
|
||||
let old = scope_stack.last_mut().unwrap();
|
||||
|
||||
Reference in New Issue
Block a user