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 #1562 Date: Thu, 6 Oct 2022 20:06:34 +0000 (GMT) [thread overview] Message-ID: <20221006200634.099D93948A6F@sourceware.org> (raw) 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(-)
reply other threads:[~2022-10-06 20:06 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=20221006200634.099D93948A6F@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).