From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1643) id 42C5B3858415; Sat, 13 Aug 2022 08:42:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 42C5B3858415 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 #1465 #1467 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: fadc70475147768a68ccc9e0011bd3fe85d90096 X-Git-Newrev: 021e4953390da748515debfc8973149457d3118a Message-Id: <20220813084250.42C5B3858415@sourceware.org> Date: Sat, 13 Aug 2022 08:42: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: Sat, 13 Aug 2022 08:42:50 -0000 https://gcc.gnu.org/g:021e4953390da748515debfc8973149457d3118a commit 021e4953390da748515debfc8973149457d3118a Merge: fadc7047514 8899dc9bf70 d4ddd73b0b8 Author: bors[bot] <26634292+bors[bot]@users.noreply.github.com> Date: Fri Aug 12 12:11:26 2022 +0000 Merge #1465 #1467 1465: intrinsics: Add wrapping_{add, sub, mul} r=CohenArthur a=CohenArthur Since wrapping arithmetics are guaranteed in Rust, we turn on the -fwrapv and simply desugar wrapping_{add, sub, mul} to their non-checked inner operations. This is the only difference between a wrapping add and a regular addition: The regular addition will gain some checks for overflows, which are simply not used for the wrapping version. Fixes #1449 `@bjorn3` if you want to have a look :) 1467: Desugar HIR::IdentifierExpr into HIR::PathInExpression r=philberty a=philberty This completly removes the HIR::IdentifierExpr and unifies how we handle generics in general. There was a hack from last year that did not infer generic arguments on IdentifierExpr's which leads to a type inferencing behvaiour mismatch which was becoming difficult to debug. This simplifies everything. The changes to the test case reflect making our code more compliant to real rustc apart from compile/traits3.rs which will be fixed as part of the refactoring effort going on in the type system. Fixes #1456 Co-authored-by: Arthur Cohen Co-authored-by: Philip Herron Diff: gcc/rust/backend/rust-compile-block.h | 3 - gcc/rust/backend/rust-compile-expr.cc | 120 --------------------- gcc/rust/backend/rust-compile-expr.h | 2 - gcc/rust/backend/rust-compile-intrinsic.cc | 69 +++++++++++- gcc/rust/backend/rust-compile-resolve-path.cc | 15 +++ gcc/rust/backend/rust-compile-struct-field-expr.h | 1 - gcc/rust/backend/rust-compile.cc | 15 ++- .../checks/errors/privacy/rust-privacy-reporter.cc | 4 - .../checks/errors/privacy/rust-privacy-reporter.h | 1 - gcc/rust/checks/errors/rust-const-checker.cc | 4 - gcc/rust/checks/errors/rust-const-checker.h | 1 - gcc/rust/checks/errors/rust-unsafe-checker.cc | 15 --- gcc/rust/checks/errors/rust-unsafe-checker.h | 1 - gcc/rust/checks/lints/rust-lint-marklive.cc | 14 --- gcc/rust/checks/lints/rust-lint-marklive.h | 1 - gcc/rust/hir/rust-ast-lower-expr.h | 15 ++- gcc/rust/hir/rust-hir-dump.cc | 3 - gcc/rust/hir/rust-hir-dump.h | 1 - gcc/rust/hir/tree/rust-hir-full-decls.h | 1 - gcc/rust/hir/tree/rust-hir-full-test.cc | 12 --- gcc/rust/hir/tree/rust-hir-visitor.h | 3 - gcc/rust/hir/tree/rust-hir.h | 58 ---------- gcc/rust/rust-lang.cc | 8 +- gcc/rust/typecheck/rust-hir-type-check-expr.cc | 56 ---------- gcc/rust/typecheck/rust-hir-type-check-expr.h | 1 - gcc/rust/typecheck/rust-hir-type-check-struct.cc | 14 ++- gcc/rust/typecheck/rust-tycheck-dump.h | 5 - gcc/testsuite/rust/compile/torture/issue-1075.rs | 3 +- gcc/testsuite/rust/compile/traits3.rs | 4 +- gcc/testsuite/rust/execute/torture/issue-1120.rs | 3 +- gcc/testsuite/rust/execute/torture/issue-1133.rs | 3 +- gcc/testsuite/rust/execute/torture/issue-1232.rs | 3 +- gcc/testsuite/rust/execute/torture/issue-1436.rs | 3 +- gcc/testsuite/rust/execute/torture/slice-magic.rs | 3 +- gcc/testsuite/rust/execute/torture/slice-magic2.rs | 3 +- gcc/testsuite/rust/execute/torture/wrapping_op1.rs | 14 +++ gcc/testsuite/rust/execute/torture/wrapping_op2.rs | 20 ++++ 37 files changed, 164 insertions(+), 338 deletions(-)