-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
"coherence failed to report ambiguity" ICE Involving Lifetimes #24424
Comments
Removing either constraint in the |
I guess we should change that error message to be different from "coherence failed to report ambiguity" to "trait selection failed". Your use-case isn't currently supported (#21974). Not sure which error message to give, through. |
A couple more examples of this (including a nightly regression) can be found in #27989 |
With rustc 1.7.0, 1.8.0 and 1.9.0, the example fails to compile, but don't generate an ICE. |
Added a regression test in #34453. |
It's been awhile since I reported this and I'm woefully out of the loop on Rust development at this point, but I'm not fully understanding the fix. The current error message is that additional type annotations are required, but my understanding of the original problem is that this is a fundamental limitation of the typechecker. Is there a way to add in more type annotations here to make this compile? I tried playing around with this a bit, but I wasn't able to come up with anything concrete. |
@kyledewey you're not wrong, the error message is poor. |
it's a limitation of the existing solver, anyway. (also, sorry for the like 2+ year gap here :) just happened to be looking at this issue) |
@nikomatsakis thanks for the clarification, hello, and no problem! :) |
The following causes an ICE:
Backtrace:
With:
I can confirm that this bug has been around since 1.0.0-alpha (though with a slightly different assertion violation; I accidentally posted that version originally).
The text was updated successfully, but these errors were encountered: