public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/rust/master] Merge #1090 #1097 #1098 #1099 #1101
@ 2022-06-08 12:27 Thomas Schwinge
  0 siblings, 0 replies; only message in thread
From: Thomas Schwinge @ 2022-06-08 12:27 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:2669e80c17f4c9d8b534c73ae0c60a51de0b4659

commit 2669e80c17f4c9d8b534c73ae0c60a51de0b4659
Merge: e5281ee490a fed5a41fb1c 6fb118f3e2e 8d3184e822a 4413bc0cf8b 3513fa38f2d
Author: bors[bot] <26634292+bors[bot]@users.noreply.github.com>
Date:   Mon Apr 11 09:10:22 2022 +0000

    Merge #1090 #1097 #1098 #1099 #1101
    
    1090: macros: add concat! macro r=philberty a=liushuyu
    
    - extracts parenthesis-matching logic into a function
    - adds `concat!` macro
    
    1097: Support mangling *const ptr and slices like *const [T] r=philberty a=philberty
    
    The legacy mangling scheme needs to convert the canonical path containing
    * for pointers and the [] brackets representing slices into:
    
      * = $BP$
      [ = $u5b$
      ] = $u5d$
    
    These symbols are not allowed in asm symbols.
    
    Addresses #849
    
    
    1098: Ensure unsize method resolutions actually unsize r=philberty a=philberty
    
    This was a typo when unsized method resolution was added, where the
    adjustment was wrongly marked as an indirection. The enum is required so
    that the code generation adjustment takes place.
    
    Addresses #849
    
    1099: Fix bad inherent overlap error r=philberty a=philberty
    
    When we examine HIR::ImplBlock's we determine if an impl might overlap
    another impl based on the Self type. So for example you might have a
    generic structure Foo<T>(T), and an associated impl block for Foo<i32>, but
    then go on to define an associated impl of Foo<T> the generic one will
    overlap any associated impl hiding the generic implementation.
    
    In this case we have two generic impl blocks
    
      *const [T]
      *const T
    
    This means the *const T might overlap with the slice one since it is
    generic. As bjorn3 pointed out in #1075 , the correct implementation is to
    observe that [T] is constrained by size but untill we have the auto trait
    of Sized we must example the two generic impls and just determine that
    they are not-equal so for now this is the best implementation we can do.
    
    Fixes #1075
    
    
    1101: Add helper as_string for DefIds r=philberty a=philberty
    
    This just adds a useful helper to as_string DefId's directly
    
    Co-authored-by: liushuyu <liushuyu011@gmail.com>
    Co-authored-by: Philip Herron <philip.herron@embecosm.com>

Diff:

 gcc/rust/backend/rust-mangle.cc                    | 16 +++++
 gcc/rust/expand/rust-macro-builtins.cc             | 69 +++++++++++++++++++---
 gcc/rust/expand/rust-macro-builtins.h              |  3 +
 gcc/rust/typecheck/rust-autoderef.cc               |  2 +-
 .../typecheck/rust-hir-inherent-impl-overlap.h     | 25 +++++++-
 gcc/rust/typecheck/rust-hir-path-probe.h           |  5 +-
 gcc/rust/typecheck/rust-tyty-bounds.cc             |  5 +-
 gcc/rust/typecheck/rust-tyty-cmp.h                 | 26 --------
 gcc/rust/util/rust-hir-map.cc                      |  1 +
 gcc/rust/util/rust-mapping-common.h                |  9 +++
 gcc/testsuite/rust/compile/builtin_macro_concat.rs | 15 +++++
 gcc/testsuite/rust/compile/generics7.rs            |  2 +-
 gcc/testsuite/rust/compile/generics8.rs            |  2 +-
 gcc/testsuite/rust/compile/torture/issue-1075.rs   | 42 +++++++++++++
 .../rust/execute/torture/builtin_macro_concat.rs   | 23 ++++++++
 15 files changed, 202 insertions(+), 43 deletions(-)


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

only message in thread, other threads:[~2022-06-08 12:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-08 12:27 [gcc/devel/rust/master] Merge #1090 #1097 #1098 #1099 #1101 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).