aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-compile-resolve-path.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/rust/backend/rust-compile-resolve-path.h')
-rw-r--r--gcc/rust/backend/rust-compile-resolve-path.h18
1 files changed, 13 insertions, 5 deletions
diff --git a/gcc/rust/backend/rust-compile-resolve-path.h b/gcc/rust/backend/rust-compile-resolve-path.h
index 9c9d7c5..37dec0b 100644
--- a/gcc/rust/backend/rust-compile-resolve-path.h
+++ b/gcc/rust/backend/rust-compile-resolve-path.h
@@ -25,10 +25,8 @@
namespace Rust {
namespace Compile {
-class ResolvePathRef : public HIRCompileBase
+class ResolvePathRef : public HIRCompileBase, public HIR::HIRPatternVisitor
{
- using Rust::Compile::HIRCompileBase::visit;
-
public:
static tree Compile (HIR::QualifiedPathInExpression &expr, Context *ctx)
{
@@ -45,10 +43,20 @@ public:
}
void visit (HIR::PathInExpression &expr) override;
-
void visit (HIR::QualifiedPathInExpression &expr) override;
-private:
+ // Empty visit for unused Pattern HIR nodes.
+ void visit (HIR::GroupedPattern &) override {}
+ void visit (HIR::IdentifierPattern &) override {}
+ void visit (HIR::LiteralPattern &) override {}
+ void visit (HIR::RangePattern &) override {}
+ void visit (HIR::ReferencePattern &) override {}
+ void visit (HIR::SlicePattern &) override {}
+ void visit (HIR::StructPattern &) override {}
+ void visit (HIR::TuplePattern &) override {}
+ void visit (HIR::TupleStructPattern &) override {}
+ void visit (HIR::WildcardPattern &) override {}
+
ResolvePathRef (Context *ctx)
: HIRCompileBase (ctx), resolved (error_mark_node)
{}