This commit is contained in:
Chris Fallin 2021-12-11 22:36:01 -08:00
parent 71078fbe4d
commit 58868c9908

View file

@ -356,7 +356,9 @@ impl LocalTracker {
let mut non_self = results.iter().filter(|&&v| v != value);
let trivial_alias = match non_self.next() {
None => None,
Some(&first) if non_self.all(|&v| v == first) => Some(first),
Some(&first) if non_self.all(|&v| v == first) && body.resolve_alias(first) != value => {
Some(first)
}
Some(_) => None,
};