From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1643) id 417B3385C017; Mon, 29 Aug 2022 15:36:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 417B3385C017 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1661787387; bh=678kdn7LJAjmm/Bhke5tzoNa5O/9iQ3fdRBLjl7zwss=; h=From:To:Subject:Date:From; b=wwjpV9ITPjwNv7SjdyMeqjEKKzRAFyWNeweKKpJSXetNc0b/Ir6NwRpZukFlMWl53 duyIMZqOWRRGta5XtqQfoap7ydgV9kLiAyykKLNswg1h3HHq6haQdzWLHgoAs3iw4E 5CjX6JeeJ6B7+Ba9/WJ4KcDhNjxOQrmGSzjLE1NQ= 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 #1507 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: 1416b85322cd9cd74c7a79e3270bb334ceb3a44c X-Git-Newrev: 595cbafdf342369ceaffd8fb4d909a9c31bef207 Message-Id: <20220829153627.417B3385C017@sourceware.org> Date: Mon, 29 Aug 2022 15:36:27 +0000 (GMT) List-Id: https://gcc.gnu.org/g:595cbafdf342369ceaffd8fb4d909a9c31bef207 commit 595cbafdf342369ceaffd8fb4d909a9c31bef207 Merge: 1416b85322c 727afe64d6c Author: bors[bot] <26634292+bors[bot]@users.noreply.github.com> Date: Thu Aug 25 15:24:50 2022 +0000 Merge #1507 1507: Desugar double borrows into two HIR:BorrowExpr's r=philberty a=philberty We simply hit a gcc_unreachable() on double borrows but it seems reasonable to just desugar the AST into a borrow of a borrow to foo. Instead of a borrow expression with a flag to be respected. Fixes #1506 Co-authored-by: Philip Herron Diff: gcc/rust/hir/rust-ast-lower-expr.h | 27 ++++++++++++++++++++---- gcc/rust/hir/tree/rust-hir-expr.h | 5 ++--- gcc/rust/typecheck/rust-hir-type-check-expr.cc | 6 ------ gcc/testsuite/rust/compile/torture/issue-1506.rs | 3 +++ 4 files changed, 28 insertions(+), 13 deletions(-)