Fix comparison of proc macros

Comparing the TypeId is not enough, they also contain data.
This commit is contained in:
Chayim Refael Friedman 2025-06-12 13:22:44 +03:00
parent c15fc9a344
commit 4f54885901
4 changed files with 52 additions and 6 deletions

View file

@ -34,9 +34,7 @@ pub trait ProcMacroExpander: fmt::Debug + Send + Sync + RefUnwindSafe + Any {
current_dir: String,
) -> Result<tt::TopSubtree, ProcMacroExpansionError>;
fn eq_dyn(&self, other: &dyn ProcMacroExpander) -> bool {
other.type_id() == self.type_id()
}
fn eq_dyn(&self, other: &dyn ProcMacroExpander) -> bool;
}
impl PartialEq for dyn ProcMacroExpander {