aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/resolve
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2022-06-17 07:50:03 +0000
committerGitHub <noreply@github.com>2022-06-17 07:50:03 +0000
commit76f7e45179de4e6e53caab104022cc0784ecd618 (patch)
tree581cf6e399375e3c26fe502bbec488f8a9dbb6b2 /gcc/rust/resolve
parent848a1a28b91d105ff4f21cc9993befbcecb3e39d (diff)
parent594854ec08cb10927f571885a0c7a4c1d47dfaf5 (diff)
downloadgcc-76f7e45179de4e6e53caab104022cc0784ecd618.zip
gcc-76f7e45179de4e6e53caab104022cc0784ecd618.tar.gz
gcc-76f7e45179de4e6e53caab104022cc0784ecd618.tar.bz2
Merge #1316
1316: Add const generic declaration to AST r=CohenArthur a=CohenArthur This uses a number of hacks and workarounds to avoid implementing the equivalent HIR node in the same PR. I'll raise issues for each of the `FIXME`s in the code. Needs one commit from #1315 to avoid unecessary conflicts. Co-authored-by: Arthur Cohen <arthur.cohen@embecosm.com>
Diffstat (limited to 'gcc/rust/resolve')
-rw-r--r--gcc/rust/resolve/rust-ast-resolve-base.cc4
-rw-r--r--gcc/rust/resolve/rust-ast-resolve-base.h1
-rw-r--r--gcc/rust/resolve/rust-ast-resolve-type.h7
3 files changed, 12 insertions, 0 deletions
diff --git a/gcc/rust/resolve/rust-ast-resolve-base.cc b/gcc/rust/resolve/rust-ast-resolve-base.cc
index 2a86618..cdc1a66 100644
--- a/gcc/rust/resolve/rust-ast-resolve-base.cc
+++ b/gcc/rust/resolve/rust-ast-resolve-base.cc
@@ -67,6 +67,10 @@ ResolverBase::visit (AST::LifetimeParam &)
{}
void
+ResolverBase::visit (AST::ConstGenericParam &)
+{}
+
+void
ResolverBase::visit (AST::PathInExpression &)
{}
diff --git a/gcc/rust/resolve/rust-ast-resolve-base.h b/gcc/rust/resolve/rust-ast-resolve-base.h
index 17d05c3..4a22a9d 100644
--- a/gcc/rust/resolve/rust-ast-resolve-base.h
+++ b/gcc/rust/resolve/rust-ast-resolve-base.h
@@ -38,6 +38,7 @@ public:
void visit (AST::IdentifierExpr &);
void visit (AST::Lifetime &);
void visit (AST::LifetimeParam &);
+ void visit (AST::ConstGenericParam &);
void visit (AST::PathInExpression &);
void visit (AST::TypePathSegment &);
void visit (AST::TypePathSegmentGeneric &);
diff --git a/gcc/rust/resolve/rust-ast-resolve-type.h b/gcc/rust/resolve/rust-ast-resolve-type.h
index cc117ec..46f1540 100644
--- a/gcc/rust/resolve/rust-ast-resolve-type.h
+++ b/gcc/rust/resolve/rust-ast-resolve-type.h
@@ -341,6 +341,13 @@ public:
ok = true;
}
+ void visit (AST::ConstGenericParam &) override
+ {
+ // For now do not do anything and accept everything.
+ // FIXME: This needs to change soon!
+ ok = true;
+ }
+
void visit (AST::TypeParam &param) override
{
ok = true;