-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Local type aliases to concrete types #1697
Comments
There's a similar problem for
But I get |
Associated constants would be nice in both |
No, we just have to make associated types allowed in inherent impls. This is actually a part of the RFC which introduced the concept IIRC. |
On the implementation side this has been hard because looking up associated types happens very early on, before a coherent list of impls is even built. We should be able to address this Soon (TM). |
This is essentially @eddyb are we there yet? (re. Soon (TM)) |
This is not possible because of an error:
can't use type parameters from outer function; try using a local type parameter instead
.There are probably good reasons for this error but I really think there should be a way to accomplish this kind of aliasing. Otherwise it makes some code noisy and hard to read:
...especially when you use
Foo<T>
andFoo<U>
a lot.The text was updated successfully, but these errors were encountered: