public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/rust/master] Merge #1317
@ 2022-06-21 10:34 Thomas Schwinge
0 siblings, 0 replies; only message in thread
From: Thomas Schwinge @ 2022-06-21 10:34 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:c0f11672d760513256997f325da678016d13f677
commit c0f11672d760513256997f325da678016d13f677
Merge: b711799e3eb 5f3c8286b22
Author: bors[bot] <26634292+bors[bot]@users.noreply.github.com>
Date: Fri Jun 17 16:11:19 2022 +0000
Merge #1317
1317: AST for const generic arguments/const application r=CohenArthur a=CohenArthur
This commit adds a new type to the AST which contains const generic
arguments. The `GenericArgs` structure now also keeps a vector of them,
and the parser was modified accordingly. We need to handle these extra
arguments in the various resolvers and type-checking phase.
As pointed out before, const generic arguments are ambiguous at the AST
level. Which is why this "sum type" contains a "Clear" variant when
there is no ambiguity at all (`<5>`, `<{ 5 }>`, `<{ 5 + 15 }>` or
`<{ N }>`) and an "Ambiguous" one if the value in question might be
referring to a type argument (`<N>`) instead of a const generic
argument.
Co-authored-by: Arthur Cohen <arthur.cohen@embecosm.com>
Diff:
gcc/rust/ast/rust-ast-full-test.cc | 14 +++
gcc/rust/ast/rust-path.h | 205 ++++++++++++++++++++++++++++---------
gcc/rust/parse/rust-parse-impl.h | 57 ++++++-----
gcc/rust/parse/rust-parse.h | 2 +-
4 files changed, 205 insertions(+), 73 deletions(-)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-06-21 10:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-21 10:34 [gcc/devel/rust/master] Merge #1317 Thomas Schwinge
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).