pub trait NormalizeEq: Eq + Normalizeable {
// Required method
fn normalize_eq(&self, other: &Self) -> bool;
}
Expand description
The NormalizeEq
trait extends Eq
and Normalizeable
to provide a method for comparing
normalized nodes in optimizations like Common Subexpression Elimination (CSE).
The normalize_eq
method ensures that two nodes that are semantically equivalent (after normalization)
are considered equal in CSE optimization, even if their original forms differ.
This trait allows for equality comparisons between nodes with equivalent semantics, regardless of their internal representations.
Required Methods§
fn normalize_eq(&self, other: &Self) -> bool
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.