public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/rust/master] Merge #1497
@ 2022-08-29 15:31 Thomas Schwinge
  0 siblings, 0 replies; only message in thread
From: Thomas Schwinge @ 2022-08-29 15:31 UTC (permalink / raw)
  To: gcc-cvs

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-08-29 15:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-29 15:31 [gcc/devel/rust/master] Merge #1497 Thomas Schwinge

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