-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Type mismatch between associated type and concrete type which are the same type. #34430
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
cc @arielb1 @nikomatsakis Which issue is this a dupe of? I never can find which one is canonical. @canndrew I believe is this is the usual "associated type projection under HRTB just doesn't get normalized" which is a limitation of the current implementation. |
Is there any workaround that you know of to trick it into normalising? Edit: Welp, explicitly specifying the return type of the closure makes it ICE. |
@eddyb I'm still here! I've just also been... everywhere else. There's a lot of 'everywhere else'... Lazy normalization AFAIK should cover this, and is WIP. |
Related, certainly. In general we don't really normalize under binders (Yet! Coming Soon, I hope!) which leads to a lot of problems. |
What's the status of this issue at the moment? I seem to run into it a couple of times a year. |
Triage: error message is different now:
|
Are there any plans to fix this? |
Compiles since 1.56.0. |
Trying to build the following code:
Gives the error:
However
<FooRef as WithLifetime<'a>>::Type
and&'a Foo
are the same type. And the compiler should be able to see that.The text was updated successfully, but these errors were encountered: