aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-compile-expr.cc
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2022-04-11 09:10:22 +0000
committerGitHub <noreply@github.com>2022-04-11 09:10:22 +0000
commit2669e80c17f4c9d8b534c73ae0c60a51de0b4659 (patch)
tree40c7b9b28b3aa2ce51f45363ce2638e0e7388fe0 /gcc/rust/backend/rust-compile-expr.cc
parente5281ee490ad9edafbde2c7d301c77130c0b4147 (diff)
parentfed5a41fb1c2c91b77297fdd6d3731078f480441 (diff)
parent6fb118f3e2ed4a189198936a82e0f68ccf954044 (diff)
parent8d3184e822af007829b3820a9b3df03b7548ff59 (diff)
parent4413bc0cf8b98702e8dd9e88ab5c0e19903e58e7 (diff)
parent3513fa38f2dbc2b564a32832ad9277ef909c6379 (diff)
downloadgcc-2669e80c17f4c9d8b534c73ae0c60a51de0b4659.zip
gcc-2669e80c17f4c9d8b534c73ae0c60a51de0b4659.tar.gz
gcc-2669e80c17f4c9d8b534c73ae0c60a51de0b4659.tar.bz2
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>