-
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
Regression in new inference scheme #16870
Comments
Without having investigated deeply, I think the problem is #3598. But I will investigate now to be sure. |
Preliminary investigation suggests that yes, the issue is #3598. In this case, the old type checker was erroneously accepting the program. The reason is that https://github.com/rust-lang/rust/blob/master/src/librustc/middle/resolve_lifetime.rs#L58 That said, I am hoping to open an RFC about support covariance soon. I want to do some local experiments, but I think the codebase is now at a point where it should be easy to introduce. |
In my branch which fixes #3598, this test compiles. |
@nikomatsakis Is your branch for issue #3598 published anywhere yet? It would be interesting to try building my library with it. In any case, I'll try your suggestion of using a specialized enum. Thanks for taking a look at this so quickly! |
Using a specialized enum worked. Since this is not actually a regression but the result of an apparent soundness bug being fixed, closing issue. |
I was having a great deal of difficulty getting my library (https://github.com/bkoropoff/rust-jlens) to build on newer versions of rustc, even after updating it to deal with generalized lifetime bounds. Reverting to a rustc prior to the new inference scheme resolved the issue. I came up with the following reduced test case:
This seems to build fine prior to the new inference scheme landing and gives the following error after:
cc @nikomatsakis
The text was updated successfully, but these errors were encountered: