-
Notifications
You must be signed in to change notification settings - Fork 13k
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
ATC-like for<'a> Fn(<X as Trait<'a>>::Type) does not consistently normalize (and can ICE). #52812
Comments
Duplicate of #53420 (at least the ICE case)? A lot of analysis wad did in the other issue. Maybe it would help. I doubt that, in such cases the associate type do normalize at all. My assumption is: In the case that you marked as "working", it is just delayed the normalization to the later stage. So if the later stage consider this is dead code it is passed and compile, otherwise, when it really need to normalize it, run into ICE. So when called explicitly like Later on, when you add the code in Given all that, I guess a proper solution is to add a "late normalization" pass to normalize any postponed normalization like this. |
closing as duplicate of #62529, which is where I will try to track future instances of this field of ICE. |
Remove `RefMutL` hack in `proc_macro::bridge` From what I can tell, rust-lang#52812 is now fixed, so there is no longer any need to keep this hack around.
Remove `RefMutL` hack in `proc_macro::bridge` From what I can tell, rust-lang#52812 is now fixed, so there is no longer any need to keep this hack around.
Rollup merge of rust-lang#121302 - GrigorenkoPV:refmutl, r=bjorn3 Remove `RefMutL` hack in `proc_macro::bridge` From what I can tell, rust-lang#52812 is now fixed, so there is no longer any need to keep this hack around.
(try on playground)
As you can see, calling
f
directly doesn't instantiate the HRTB (even though it needs to AFAIK) or if it does it doesn't normalize the resulting bound, whereas going throughcall
normalizes the instantiated argument types ofcall
, whilecall
's definition can be type-checked as-is.EDIT: you can also get an ICE by uncommenting the use in
main
:cc @nikomatsakis (this might be a duplicate)
The text was updated successfully, but these errors were encountered: