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

https://gcc.gnu.org/g:b4096017e3b9ca499b56988b67e05667a02ca202

commit b4096017e3b9ca499b56988b67e05667a02ca202
Merge: adaf4561d63 a7d2643d9b0
Author: bors[bot] <26634292+bors[bot]@users.noreply.github.com>
Date:   Thu Oct 6 13:07:50 2022 +0000

    Merge #1562
    
    1562: Support looking up super trait items during path resolution r=philberty a=philberty
    
    When we lookup names in paths such as Foo::bar, foo is a type we resolve
    and then we lookup 'bar' based on what type Foo is which includes probing
    relevant bounds of this type. We currently return a vector of possible
    candidates and this patch changes it so that we return a vector of unique
    items based on DefId. Ideally we should use move to a std::set for this.
    
    The final patch actually updates the trait reference lookup functions to revert
    to looking up relevant super traits when required.
    
    Fixes #1555
    
    Co-authored-by: Philip Herron <philip.herron@embecosm.com>

Diff:

 gcc/rust/backend/rust-compile-expr.cc              |   4 +-
 gcc/rust/backend/rust-compile-resolve-path.cc      |   8 +-
 gcc/rust/typecheck/rust-hir-path-probe.h           | 108 ++++++++++-----------
 gcc/rust/typecheck/rust-hir-trait-ref.h            |  19 ++++
 gcc/rust/typecheck/rust-hir-type-check-enumitem.cc |   4 +
 gcc/rust/typecheck/rust-hir-type-check-item.cc     |   9 +-
 gcc/rust/typecheck/rust-hir-type-check-path.cc     |   2 +-
 gcc/rust/typecheck/rust-hir-type-check-type.cc     |   2 +-
 gcc/rust/typecheck/rust-tyty.h                     |  22 +++--
 gcc/testsuite/rust/compile/torture/issue-1555.rs   |  48 +++++++++
 10 files changed, 147 insertions(+), 79 deletions(-)

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

only message in thread, other threads:[~2022-10-06 20:06 UTC | newest]

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