[gcc/devel/rust/master] Merge #1431

Thomas Schwinge tschwinge@gcc.gnu.org
Sat Aug 6 12:10:26 GMT 2022


https://gcc.gnu.org/g:a39108dea1d091545982fefa88ce3be31b9eedf2

commit a39108dea1d091545982fefa88ce3be31b9eedf2
Merge: e77bc10ba13 5d17a8b6b2c
Author: bors[bot] <26634292+bors[bot]@users.noreply.github.com>
Date:   Fri Aug 5 10:09:20 2022 +0000

    Merge #1431
    
    1431: Incremental refactor for better coercion site support r=philberty a=philberty
    
    This is the major refactor to get our coercion site code closer to Rustc.
    It introduced several new pieces most notably a refactor to the autoderef
    cycle so this can be reused in method resolution and in coercion sites which
    allows us to handle deref coercions. It will eventually allow us to get rid
    of our bad implementation in rust-tyty-coercion.h which is just messy now.
    
    Fixes #1198
    
    Co-authored-by: Philip Herron <philip.herron@embecosm.com>

Diff:

 gcc/rust/Make-lang.in                            |   2 +
 gcc/rust/backend/rust-compile-base.cc            |  14 +-
 gcc/rust/backend/rust-compile-base.h             |   9 +-
 gcc/rust/backend/rust-compile-expr.cc            | 103 +++------
 gcc/rust/backend/rust-compile-expr.h             |  28 +--
 gcc/rust/backend/rust-compile-extern.h           |   9 +-
 gcc/rust/backend/rust-compile-implitem.cc        |  10 +-
 gcc/rust/backend/rust-compile-item.cc            |   9 +-
 gcc/rust/backend/rust-compile-resolve-path.cc    |   6 +-
 gcc/rust/backend/rust-compile-stmt.h             |   3 +-
 gcc/rust/backend/rust-compile.cc                 |  55 ++---
 gcc/rust/hir/tree/rust-hir-expr.h                |  26 ++-
 gcc/rust/rust-backend.h                          |   8 -
 gcc/rust/rust-gcc.cc                             |  24 --
 gcc/rust/typecheck/rust-autoderef.cc             | 124 +++++++++++
 gcc/rust/typecheck/rust-autoderef.h              |  21 ++
 gcc/rust/typecheck/rust-coercion.cc              |  92 ++++++++
 gcc/rust/typecheck/rust-coercion.h               |  70 ++++++
 gcc/rust/typecheck/rust-hir-dot-operator.cc      | 177 +++------------
 gcc/rust/typecheck/rust-hir-dot-operator.h       |  41 ++--
 gcc/rust/typecheck/rust-hir-type-check-base.cc   |  22 ++
 gcc/rust/typecheck/rust-hir-type-check-base.h    |   3 +
 gcc/rust/typecheck/rust-hir-type-check-expr.cc   | 157 ++++++++++++-
 gcc/rust/typecheck/rust-hir-type-check-expr.h    | 155 +------------
 gcc/rust/typecheck/rust-hir-type-check-stmt.h    |   3 +-
 gcc/rust/typecheck/rust-hir-type-check-struct.cc |  16 +-
 gcc/rust/typecheck/rust-tyty-call.cc             | 269 +++++++++++++++++++++++
 gcc/rust/typecheck/rust-tyty-cmp.h               | 106 ++++++++-
 gcc/rust/typecheck/rust-tyty.cc                  | 238 --------------------
 gcc/testsuite/rust/compile/generics4.rs          |   7 +-
 gcc/testsuite/rust/compile/reference1.rs         |   3 +-
 gcc/testsuite/rust/compile/shadow1.rs            |   3 +-
 gcc/testsuite/rust/compile/type-bindings1.rs     |   1 -
 gcc/testsuite/rust/execute/torture/issue-1198.rs |  75 +++++++
 34 files changed, 1122 insertions(+), 767 deletions(-)


More information about the Gcc-cvs mailing list