public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Thomas Schwinge <tschwinge@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc/devel/rust/master] Merge #1465 #1467
Date: Sat, 13 Aug 2022 08:42:50 +0000 (GMT)	[thread overview]
Message-ID: <20220813084250.42C5B3858415@sourceware.org> (raw)

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 <arthur.cohen@embecosm.com>
    Co-authored-by: Philip Herron <philip.herron@embecosm.com>

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(-)


                 reply	other threads:[~2022-08-13  8:42 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220813084250.42C5B3858415@sourceware.org \
    --to=tschwinge@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).