aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend
diff options
context:
space:
mode:
authorPhilip Herron <philip.herron@embecosm.com>2021-04-15 17:41:40 +0100
committerPhilip Herron <philip.herron@embecosm.com>2021-04-16 16:08:55 +0100
commitee247029acfaee991660ff14c85f7146b9040511 (patch)
treeb025ed32a121c3774f9c83803e18d6ec0fffeed0 /gcc/rust/backend
parentce593f09f410e1ab0cfe44a680299bc47ab7885f (diff)
downloadgcc-ee247029acfaee991660ff14c85f7146b9040511.zip
gcc-ee247029acfaee991660ff14c85f7146b9040511.tar.gz
gcc-ee247029acfaee991660ff14c85f7146b9040511.tar.bz2
Fix crash when mapping of Generic argument changes.
When we have a struct Foo <T>(T) but the fntype in impl block is different fn <X> Bar(a:X) -> Foo<X>(X) { } we must take advantage of the adjustment code in the substitution mapper. This affects MethodCallExpr and PathInExpressions where it used to resolve the root segment and leave the arguments as inference variables when we lack a segement with generic arguments. This also fixes a bug in name resolution where the Self keyword resolved to the struct/type the impl block resolves to but it needed to resolve to the impl block type explicitly which ensures the parameter mappings reflect what the parent impl block is. Fixes: #376
Diffstat (limited to 'gcc/rust/backend')
0 files changed, 0 insertions, 0 deletions