On 11/07/2021 22:39, Mark Wielaard wrote: > Almost all HIR Macro related trees were already removed by > https://github.com/Rust-GCC/gccrs/pull/492 > > But there was still one MacroItem class left in rust-hir.h and several > (unused) forward declarations in various other hir .h files. Remove > them all. > > Resolves: https://github.com/Rust-GCC/gccrs/issues/69 > --- > gcc/rust/hir/tree/rust-hir-expr.h | 3 --- > gcc/rust/hir/tree/rust-hir-item.h | 3 --- > gcc/rust/hir/tree/rust-hir-pattern.h | 2 -- > gcc/rust/hir/tree/rust-hir-type.h | 3 --- > gcc/rust/hir/tree/rust-hir.h | 11 ----------- > 5 files changed, 22 deletions(-) > > diff --git a/gcc/rust/hir/tree/rust-hir-expr.h b/gcc/rust/hir/tree/rust-hir-expr.h > index 681ccf8ad65..2b1e9380f6c 100644 > --- a/gcc/rust/hir/tree/rust-hir-expr.h > +++ b/gcc/rust/hir/tree/rust-hir-expr.h > @@ -3094,9 +3094,6 @@ protected: > } > }; > > -// Forward decl - defined in rust-macro.h > -class MacroInvocation; > - > // An unsafe block HIR node > class UnsafeBlockExpr : public ExprWithBlock > { > diff --git a/gcc/rust/hir/tree/rust-hir-item.h b/gcc/rust/hir/tree/rust-hir-item.h > index 10b1f6143f0..e7e110fda92 100644 > --- a/gcc/rust/hir/tree/rust-hir-item.h > +++ b/gcc/rust/hir/tree/rust-hir-item.h > @@ -3020,9 +3020,6 @@ protected: > }*/ > }; > > -// Replaced with forward decls - defined in "rust-macro.h" > -class MacroItem; > -class MacroRulesDefinition; > } // namespace HIR > } // namespace Rust > > diff --git a/gcc/rust/hir/tree/rust-hir-pattern.h b/gcc/rust/hir/tree/rust-hir-pattern.h > index 27cba7d6e18..ac7155d562f 100644 > --- a/gcc/rust/hir/tree/rust-hir-pattern.h > +++ b/gcc/rust/hir/tree/rust-hir-pattern.h > @@ -1152,8 +1152,6 @@ class PathPattern; > class PathInExpression; > class QualifiedPathInExpression; > > -// Replaced with forward decl - defined in rust-macro.h > -class MacroInvocation; > } // namespace HIR > } // namespace Rust > > diff --git a/gcc/rust/hir/tree/rust-hir-type.h b/gcc/rust/hir/tree/rust-hir-type.h > index 42fccb59607..c4771b6db38 100644 > --- a/gcc/rust/hir/tree/rust-hir-type.h > +++ b/gcc/rust/hir/tree/rust-hir-type.h > @@ -907,9 +907,6 @@ protected: > } > }; > > -// Forward decl - defined in rust-macro.h > -class MacroInvocation; > - > /* TODO: possible types > * struct type? > * "enum" (tagged union) type? > diff --git a/gcc/rust/hir/tree/rust-hir.h b/gcc/rust/hir/tree/rust-hir.h > index 1819d17b585..7d53feb0a4e 100644 > --- a/gcc/rust/hir/tree/rust-hir.h > +++ b/gcc/rust/hir/tree/rust-hir.h > @@ -613,17 +613,6 @@ protected: > } > }; > > -// A macro item HIR node - potentially abstract base class > -class MacroItem : public Item > -{ > - /*public: > - std::string as_string() const;*/ > -protected: > - MacroItem (Analysis::NodeMapping mappings, AST::AttrVec outer_attribs) > - : Item (std::move (mappings), std::move (outer_attribs)) > - {} > -}; > - > // Item used in trait declarations - abstract base class > class TraitItem > { Hi Mark, Thanks for this, I missed these tree's in my last cleanup. This is currently being merged: https://github.com/Rust-GCC/gccrs/pull/560 Thanks --Phil