diff --git a/src/frontend.rs b/src/frontend.rs index 80a2379..9ad5854 100644 --- a/src/frontend.rs +++ b/src/frontend.rs @@ -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, };