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 #1497
Date: Mon, 29 Aug 2022 15:31:58 +0000 (GMT)	[thread overview]
Message-ID: <20220829153158.3D9A43857348@sourceware.org> (raw)

https://gcc.gnu.org/g:825a44b40ce6cfa76470e53d0746b1e64b99ee5b

commit 825a44b40ce6cfa76470e53d0746b1e64b99ee5b
Merge: 241fcaacf60 36a9255b1b6
Author: bors[bot] <26634292+bors[bot]@users.noreply.github.com>
Date:   Tue Aug 23 19:16:47 2022 +0000

    Merge #1497
    
    1497: Refactor our casts to follow the Rustc implemention r=philberty a=philberty
    
    This gets rid of our old visitor system for cast type checking. Casts
    depend on type coercions as they are meant to attempt a type coercion
    before trying a simple cast. This explicitly defines the rules which should
    be allowed for simple casts. In rustc they use match expressions to write
    a list of casts which should not be allowed. We have likely missed some
    rules of what should be allowed but this is at least the start of how
    to implement this.
    
    Fixes #1496
    
    
    
    Co-authored-by: Philip Herron <philip.herron@embecosm.com>

Diff:

 gcc/rust/Make-lang.in                            |    1 +
 gcc/rust/backend/rust-compile-expr.cc            |   24 +-
 gcc/rust/typecheck/rust-casts.cc                 |  292 +++++
 gcc/rust/typecheck/rust-casts.h                  |   53 +
 gcc/rust/typecheck/rust-coercion.cc              |   89 +-
 gcc/rust/typecheck/rust-coercion.h               |   16 +-
 gcc/rust/typecheck/rust-hir-type-check-base.cc   |   33 +-
 gcc/rust/typecheck/rust-hir-type-check-base.h    |    7 +-
 gcc/rust/typecheck/rust-hir-type-check-expr.cc   |   15 +-
 gcc/rust/typecheck/rust-hir-type-check.h         |   20 +
 gcc/rust/typecheck/rust-tyty-cast.h              | 1425 ----------------------
 gcc/rust/typecheck/rust-tyty.cc                  |  178 +--
 gcc/rust/typecheck/rust-tyty.h                   |   64 +-
 gcc/testsuite/rust/execute/torture/issue-1496.rs |   75 ++
 14 files changed, 600 insertions(+), 1692 deletions(-)

                 reply	other threads:[~2022-08-29 15:31 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=20220829153158.3D9A43857348@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).