aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/parse/rust-parse.cc
diff options
context:
space:
mode:
authorPhilip Herron <philip.herron@embecosm.com>2022-03-16 16:19:31 +0000
committerPhilip Herron <philip.herron@embecosm.com>2022-03-16 22:12:35 +0000
commit8086790254d0adaad48405ee838b8ca699e9d9a8 (patch)
tree12f83b7535a7c2c881f1e5a2b56df0d669c88cb0 /gcc/rust/parse/rust-parse.cc
parent21cf0e67a6f748525ca79e8d9aa59c94bef13519 (diff)
downloadgcc-8086790254d0adaad48405ee838b8ca699e9d9a8.zip
gcc-8086790254d0adaad48405ee838b8ca699e9d9a8.tar.gz
gcc-8086790254d0adaad48405ee838b8ca699e9d9a8.tar.bz2
Fix unconstrained type parameter checks
This patch removes our old method of checking for unconstrained type parameters which only worked for the basic cases such as: impl<T> Foo { } But checking for unconstrained types is more complex, we need to handle covariant types such as: impl<T> *T { } Or struct foo<X,Y>(X,Y); impl<T> foo<&T,*T> {} This rewrites the algorithm to take advantage of our substition abstractions and HirIds so we can map the ids of the type-params to be constrained and look at the trait-references used-arguments when the generics are applied (or they may be empty) and then do the same for any used arguments on an algebraic data type. Fixes #1019
Diffstat (limited to 'gcc/rust/parse/rust-parse.cc')
0 files changed, 0 insertions, 0 deletions