-
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: Not well-formed HRTB doesn't compile #55498
Comments
Compiles fine on 1.30.0, fails on 1.31.0. This might be expected fallout from a soundness fix, but I'll mark this as a regression anyways (looks like this completely fell through the cracks). |
@rustbot ping cleanup To find where this "broke" |
Hey Cleanup Crew ICE-breakers! This bug has been identified as a good cc @AminArria @camelid @chrissimpkins @contrun @DutchGhost @elshize @ethanboxx @h-michael @HallerPatrick @hdhoang @hellow554 @imtsuki @kanru @KarlK90 @LeSeulArtichaut @MAdrianMattocks @matheus-consoli @mental32 @nmccarty @Noah-Kennedy @pard68 @PeytonT @pierreN @Redblueflame @RobbieClarken @RobertoSnap @robjtede @SarthakSingh31 @senden9 @shekohex @sinato @spastorino @turboladen @woshilapin @yerke |
Regression in nightly-2018-10-05 fetching https://static.rust-lang.org/dist/2018-10-04/channel-rust-nightly-git-commit-hash.txt |
Related to #54624 I guess |
OK, I suspect I know what caused this. Ah, yes, so I see that @spastorino posted the list -- it's pretty clearl #54649. I believe that the error is correct, at least given the current capabilities of the compiler, if unfortunate. This issue is also a sort of duplicate with some other issues I may try to find later. =) In short, the error is occurring because we cannot prove I'm actually not 100% sure why this used to work, but it is likely because we somehow inferred some region to In short, it's a regression, yes, but I think a justified one, though I do hope we'll accept this code (or code much like it) at some point -- I guess I'd like to talk to @mashedcode about how we can help you to adjust your code, that is perhaps the most likely solution. (Though it might be worth me digging in to see why it was accepted before, as I don't quite get it.) |
Oh, actually I think @spastorino's citation of #54624 is on the money. It could be it's both PRs in combination. I don't think I quite realized how old this regression is. I take back some of what I wrote above, which refers to a more recent PR, but perhaps not the ultimate conclusion that this is more-or-less a "bug fix". |
Closing as won't fix, according to @nikomatsakis' comments. This was also briefly discussed on this Zulip topic. |
@nikomatsakis Thanks for looking into it. I don't even remember how I fixed that but if I recall correctly this code doesn't use any generics anymore. So all good! |
The code below doesn't compile anymore since nightly-2018-10-05:
(Playground)
One would expect this to compile since it compiles on stable. Instead it throws:
AFAIK
for<'b, 'a> 'b: 'a
can currently not be satisfied in rust therefore this should compile.The text was updated successfully, but these errors were encountered: