public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Thomas Schwinge <tschwinge@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc/devel/rust/master] Merge #1358 Date: Tue, 19 Jul 2022 07:40:08 +0000 (GMT) [thread overview] Message-ID: <20220719074008.DF3713857809@sourceware.org> (raw) https://gcc.gnu.org/g:265d5e86f26d6dff9a795dace55243ac7de12134 commit 265d5e86f26d6dff9a795dace55243ac7de12134 Merge: 6920d2294b3 d82201be88c Author: bors[bot] <26634292+bors[bot]@users.noreply.github.com> Date: Mon Jul 18 15:23:07 2022 +0000 Merge #1358 1358: Disambiguate generic args r=CohenArthur a=CohenArthur Needs #1355. Only review the last commit. The next steps are to typecheck const generics and then lower them to TREE This removes all the hacks previously introduced to resolve ambiguous generic args as types, and adds proper disambiguation. The algorithm is as follows: is that name referring to a type? -> disambiguate to a type is that name referring to a value? -> disambiguate to a const value else -> disambiguate to type Since types are the default expected behavior, this allows us to report type errors properly during typechecking. Co-authored-by: Arthur Cohen <arthur.cohen@embecosm.com> Diff: gcc/rust/expand/rust-attribute-visitor.cc | 41 +++++++---- gcc/rust/hir/rust-ast-lower-base.cc | 7 -- gcc/rust/hir/rust-ast-lower-type.h | 7 +- gcc/rust/resolve/rust-ast-resolve-expr.cc | 2 +- gcc/rust/resolve/rust-ast-resolve-type.cc | 98 +++++++++++++++++++------- gcc/rust/resolve/rust-ast-resolve-type.h | 24 +++++++ gcc/testsuite/rust/compile/const_generics_5.rs | 12 ++++ 7 files changed, 140 insertions(+), 51 deletions(-)
reply other threads:[~2022-07-19 7:40 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220719074008.DF3713857809@sourceware.org \ --to=tschwinge@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).