From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1643) id 1D22D3AA990F; Wed, 8 Jun 2022 12:04:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1D22D3AA990F 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 #912 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: 055ca34daa803f5353ced57d2d30041b93701c8c X-Git-Newrev: 6d1ff568084ed86e6cf14e709fe6892256be824a Message-Id: <20220608120452.1D22D3AA990F@sourceware.org> Date: Wed, 8 Jun 2022 12:04:52 +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:04:52 -0000 https://gcc.gnu.org/g:6d1ff568084ed86e6cf14e709fe6892256be824a commit 6d1ff568084ed86e6cf14e709fe6892256be824a Merge: 055ca34daa8 257bf558274 Author: bors[bot] <26634292+bors[bot]@users.noreply.github.com> Date: Tue Feb 8 17:56:41 2022 +0000 Merge #912 912: Handle generic substitution on path expressions r=philberty a=philberty In this bug the path expression failed to take Foo:: and apply this bound generic argument into the impl block. The fn type for this function test is: fn test(a:T, b:Y); But the impl block has a Self of Foo so we need to inherit the T argument from the previous Foo:: which was missing. Fixes #893 Co-authored-by: Philip Herron Diff: gcc/rust/typecheck/rust-hir-type-check-path.cc | 85 +++++++++++++++++------ gcc/rust/typecheck/rust-substitution-mapper.cc | 18 +++++ gcc/rust/typecheck/rust-substitution-mapper.h | 3 + gcc/rust/typecheck/rust-tyty.cc | 39 +++++++++++ gcc/rust/typecheck/rust-tyty.h | 51 ++++++++++++++ gcc/testsuite/rust/compile/torture/issue-893-2.rs | 35 ++++++++++ gcc/testsuite/rust/compile/torture/issue-893.rs | 11 +++ 7 files changed, 219 insertions(+), 23 deletions(-)