aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-compile-expr.cc
diff options
context:
space:
mode:
authorPhilip Herron <philip.herron@embecosm.com>2022-03-30 18:13:48 +0100
committerPhilip Herron <philip.herron@embecosm.com>2022-04-11 09:47:22 +0100
commit4413bc0cf8b98702e8dd9e88ab5c0e19903e58e7 (patch)
tree0d48ee476e0e52a0c130da0b95b27f2423466613 /gcc/rust/backend/rust-compile-expr.cc
parente43a5c5373b341d217d2f5403f31f5174b8c4e2f (diff)
downloadgcc-4413bc0cf8b98702e8dd9e88ab5c0e19903e58e7.zip
gcc-4413bc0cf8b98702e8dd9e88ab5c0e19903e58e7.tar.gz
gcc-4413bc0cf8b98702e8dd9e88ab5c0e19903e58e7.tar.bz2
Fix bad inherent overlap error
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
Diffstat (limited to 'gcc/rust/backend/rust-compile-expr.cc')
0 files changed, 0 insertions, 0 deletions