Skip to content

Commit

Permalink
Remove HIR MacroItem and other hir macro forward declarations
Browse files Browse the repository at this point in the history
Almost all HIR Macro related trees were already removed by
#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: #69
  • Loading branch information
Mark Wielaard authored and philberty committed Jul 12, 2021
1 parent 4560f46 commit 36bd4a5
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 22 deletions.
3 changes: 0 additions & 3 deletions gcc/rust/hir/tree/rust-hir-expr.h
Original file line number Diff line number Diff line change
Expand Up @@ -3094,9 +3094,6 @@ class ReturnExpr : public ExprWithoutBlock
}
};

// Forward decl - defined in rust-macro.h
class MacroInvocation;

// An unsafe block HIR node
class UnsafeBlockExpr : public ExprWithBlock
{
Expand Down
3 changes: 0 additions & 3 deletions gcc/rust/hir/tree/rust-hir-item.h
Original file line number Diff line number Diff line change
Expand Up @@ -3020,9 +3020,6 @@ class ExternBlock : public VisItem
}*/
};

// Replaced with forward decls - defined in "rust-macro.h"
class MacroItem;
class MacroRulesDefinition;
} // namespace HIR
} // namespace Rust

Expand Down
2 changes: 0 additions & 2 deletions gcc/rust/hir/tree/rust-hir-pattern.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 0 additions & 3 deletions gcc/rust/hir/tree/rust-hir-type.h
Original file line number Diff line number Diff line change
Expand Up @@ -907,9 +907,6 @@ class BareFunctionType : public TypeNoBounds
}
};

// Forward decl - defined in rust-macro.h
class MacroInvocation;

/* TODO: possible types
* struct type?
* "enum" (tagged union) type?
Expand Down
11 changes: 0 additions & 11 deletions gcc/rust/hir/tree/rust-hir.h
Original file line number Diff line number Diff line change
Expand Up @@ -613,17 +613,6 @@ class LifetimeParam : public GenericParam
}
};

// 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
{
Expand Down

0 comments on commit 36bd4a5

Please sign in to comment.