From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1643) id 26D0B3816647; Wed, 8 Jun 2022 12:11:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 26D0B3816647 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 #953 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: 265c223766f1f4525558d086ccc46bd49f7b26e0 X-Git-Newrev: e0f261f1aea2c9968a07442ca5d4eab813f86a58 Message-Id: <20220608121118.26D0B3816647@sourceware.org> Date: Wed, 8 Jun 2022 12:11:18 +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:11:18 -0000 https://gcc.gnu.org/g:e0f261f1aea2c9968a07442ca5d4eab813f86a58 commit e0f261f1aea2c9968a07442ca5d4eab813f86a58 Merge: 265c223766f 865aa0aeb56 Author: bors[bot] <26634292+bors[bot]@users.noreply.github.com> Date: Tue Feb 22 16:25:07 2022 +0000 Merge #953 953: Refactor lang item mappings r=philberty a=philberty This refactors how we find our lang items so that during HIR lowering we have a generic outer attributes handler on Items. The old code only done lang item mappings during the type check pass and assumed all lang items are Traits which is not the case. To implement slices range syntax actually map to structs within libcore/ops/range.rs which have lang items on structs. This means we can have lang items on any Item. Co-authored-by: Philip Herron Diff: gcc/rust/Make-lang.in | 1 + gcc/rust/hir/rust-ast-lower-base.h | 17 +- gcc/rust/hir/rust-ast-lower-item.h | 4 + gcc/rust/hir/rust-ast-lower.cc | 64 ++++++ gcc/rust/typecheck/rust-hir-trait-resolve.h | 25 --- gcc/rust/util/rust-attributes.cc | 61 +++++ gcc/rust/util/rust-attributes.h | 70 ++++++ gcc/rust/util/rust-hir-map.h | 270 +--------------------- gcc/rust/util/rust-lang-item.h | 334 ++++++++++++++++++++++++++++ 9 files changed, 551 insertions(+), 295 deletions(-)