diff options
Diffstat (limited to 'gcc/rust/backend')
-rw-r--r-- | gcc/rust/backend/rust-compile-fnparam.h | 1 | ||||
-rw-r--r-- | gcc/rust/backend/rust-compile-pattern.h | 20 | ||||
-rw-r--r-- | gcc/rust/backend/rust-compile-resolve-path.h | 1 | ||||
-rw-r--r-- | gcc/rust/backend/rust-compile-var-decl.h | 1 |
4 files changed, 23 insertions, 0 deletions
diff --git a/gcc/rust/backend/rust-compile-fnparam.h b/gcc/rust/backend/rust-compile-fnparam.h index 289ecee..6f7f0653 100644 --- a/gcc/rust/backend/rust-compile-fnparam.h +++ b/gcc/rust/backend/rust-compile-fnparam.h @@ -39,6 +39,7 @@ public: void visit (HIR::TupleStructPattern &) override; // Empty visit for unused Pattern HIR nodes. + void visit (HIR::AltPattern &) override {} void visit (HIR::LiteralPattern &) override {} void visit (HIR::PathInExpression &) override {} void visit (HIR::QualifiedPathInExpression &) override {} diff --git a/gcc/rust/backend/rust-compile-pattern.h b/gcc/rust/backend/rust-compile-pattern.h index 0d53cd5..a7bd115 100644 --- a/gcc/rust/backend/rust-compile-pattern.h +++ b/gcc/rust/backend/rust-compile-pattern.h @@ -39,6 +39,13 @@ public: void visit (HIR::WildcardPattern &pattern) override; void visit (HIR::RangePattern &pattern) override; + // unsupported + void visit (HIR::AltPattern &pattern) override + { + rust_sorry_at (pattern.get_locus (), + "alternate pattern case labels not supported"); + } + // Empty visit for unused Pattern HIR nodes. void visit (HIR::IdentifierPattern &) override {} void visit (HIR::LiteralPattern &) override; @@ -70,6 +77,13 @@ public: void visit (HIR::StructPattern &pattern) override; void visit (HIR::TupleStructPattern &pattern) override; + // unsupported + void visit (HIR::AltPattern &pattern) override + { + rust_sorry_at (pattern.get_locus (), + "alternate pattern bindings not supported"); + } + // Empty visit for unused Pattern HIR nodes. void visit (HIR::IdentifierPattern &) override {} void visit (HIR::LiteralPattern &) override {} @@ -104,6 +118,12 @@ public: void visit (HIR::TuplePattern &) override; // check for unimplemented Pattern HIR nodes. + void visit (HIR::AltPattern &pattern) override + { + rust_sorry_at (pattern.get_locus (), + "alternate pattern let statements not supported"); + } + void visit (HIR::LiteralPattern &pattern) override { rust_sorry_at (pattern.get_locus (), diff --git a/gcc/rust/backend/rust-compile-resolve-path.h b/gcc/rust/backend/rust-compile-resolve-path.h index 8aedb16..93b0a7f 100644 --- a/gcc/rust/backend/rust-compile-resolve-path.h +++ b/gcc/rust/backend/rust-compile-resolve-path.h @@ -50,6 +50,7 @@ public: void visit (HIR::RangePattern &) override {} void visit (HIR::ReferencePattern &) override {} void visit (HIR::SlicePattern &) override {} + void visit (HIR::AltPattern &) override {} void visit (HIR::StructPattern &) override {} void visit (HIR::TuplePattern &) override {} void visit (HIR::TupleStructPattern &) override {} diff --git a/gcc/rust/backend/rust-compile-var-decl.h b/gcc/rust/backend/rust-compile-var-decl.h index a4aa7cf8..9a3fcb5 100644 --- a/gcc/rust/backend/rust-compile-var-decl.h +++ b/gcc/rust/backend/rust-compile-var-decl.h @@ -54,6 +54,7 @@ public: } // Empty visit for unused Pattern HIR nodes. + void visit (HIR::AltPattern &) override {} void visit (HIR::LiteralPattern &) override {} void visit (HIR::PathInExpression &) override {} void visit (HIR::QualifiedPathInExpression &) override {} |