-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gccrs: remove horrible hack in solving complex generics on impl blocks
We hit an assertion with range based iterators here. This code was used to solve complex generics such as: struct Foo<X,Y>(X,Y); impl<T> Foo<T, i32> { fn test<Y>(self, a: Y) { } } The impl item will have the signiture of: fn test<T,Y> (Foo<T, i32> self, a:Y) So in the case where we have: let a = Foo(123f32, 456); a.test<bool>(true); We need to solve the generic argument T from the impl block by infering the arguments there and applying them so that when we apply the generic argument bool we dont end up in the case of missing number of generics. Addresses #1895 gcc/rust/ChangeLog: * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): remove hack Signed-off-by: Philip Herron <[email protected]>
- Loading branch information
Showing
1 changed file
with
42 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters