From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1643) id B38B638928D5; Wed, 8 Jun 2022 12:40:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B38B638928D5 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Thomas Schwinge To: gcc-cvs@gcc.gnu.org Subject: [gcc/devel/rust/master] Merge #1190 #1192 #1193 X-Act-Checkin: gcc X-Git-Author: bors[bot] <26634292+bors[bot]@users.noreply.github.com> X-Git-Refname: refs/heads/devel/rust/master X-Git-Oldrev: 9cf744cbd762442ab33b3f92067829883d7d2d73 X-Git-Newrev: 83e13db1fa12d3ff8751a293595cbf01fd1ac236 Message-Id: <20220608124050.B38B638928D5@sourceware.org> Date: Wed, 8 Jun 2022 12:40:50 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jun 2022 12:40:50 -0000 https://gcc.gnu.org/g:83e13db1fa12d3ff8751a293595cbf01fd1ac236 commit 83e13db1fa12d3ff8751a293595cbf01fd1ac236 Merge: 9cf744cbd76 bbf171c9d25 7fe6bc1ba1a ae085ac7b12 Author: bors[bot] <26634292+bors[bot]@users.noreply.github.com> Date: Thu Apr 28 14:19:07 2022 +0000 Merge #1190 #1192 #1193 1190: Fix ICE in reachability class and refactor associated types code r=philberty a=philberty There are several fixes going on to solve these issues which overlap with one another so it seemed best to pack them within the same PR. The main issue for #1128 was that we did not resolve a trait when it was unused leading to us hitting the ICE in the privacy pass. Since the type check context was empty for the trait since it was not resolved. To fix this we needed to refactor the trait resolver to resolve the trait as part of iterating the crate. This resulted in some regressions in the testsuite so this is why we need the the other commits. Which required us to finally perform the refactor specified in #1105 to fix these. Fixes #1105 #1128 #1132 1192: Add an assertion to avoid peeking when the stack is empty r=philberty a=philberty This will ensure we get a proper ICE instead of memory corruption/segv. Addresses #1130 1193: Remove unused parameter caller from generating Call expressions r=philberty a=philberty Within const context the fncontext maybe empty which in turn results in a segv for generating const calls which will be evaluated by the const-expr code anyway. Addresses #1130 Co-authored-by: Philip Herron Diff: gcc/rust/backend/rust-compile-context.h | 6 +- gcc/rust/backend/rust-compile-expr.cc | 27 +-- gcc/rust/backend/rust-compile-implitem.cc | 1 + gcc/rust/backend/rust-compile-item.cc | 1 + gcc/rust/backend/rust-compile-resolve-path.cc | 15 -- gcc/rust/rust-backend.h | 3 +- gcc/rust/rust-gcc.cc | 5 +- gcc/rust/typecheck/rust-hir-path-probe.h | 12 -- gcc/rust/typecheck/rust-hir-trait-ref.h | 11 +- gcc/rust/typecheck/rust-hir-trait-resolve.cc | 270 +++++++++++++++++++------ gcc/rust/typecheck/rust-hir-trait-resolve.h | 191 +---------------- gcc/rust/typecheck/rust-hir-type-check-item.h | 2 + gcc/rust/typecheck/rust-hir-type-check-path.cc | 71 +++---- gcc/rust/typecheck/rust-hir-type-check-type.cc | 67 ++---- gcc/rust/typecheck/rust-tyty.cc | 35 +++- gcc/testsuite/rust/compile/issue-1128.rs | 6 + 16 files changed, 323 insertions(+), 400 deletions(-)