public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/rust/master] Merge #1358
@ 2022-07-19  7:40 Thomas Schwinge
  0 siblings, 0 replies; only message in thread
From: Thomas Schwinge @ 2022-07-19  7:40 UTC (permalink / raw)
  To: gcc-cvs

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(-)


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-07-19  7:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-19  7:40 [gcc/devel/rust/master] Merge #1358 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).