-
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
Warnings for issue #32330 #33137
Warnings for issue #32330 #33137
Conversation
☔ The latest upstream changes (presumably #33179) made this pull request unmergeable. Please resolve the merge conflicts. |
a254c26
to
4fe2845
Compare
@@ -626,3 +635,39 @@ impl<'tcx> TypeVisitor<'tcx> for HasTypeFlagsVisitor { | |||
false | |||
} | |||
} | |||
|
|||
/// Collects all the late-bound regions it finds into a hash set. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment might want to live on the public function instead.
☔ The latest upstream changes (presumably #32756) made this pull request unmergeable. Please resolve the merge conflicts. |
4fe2845
to
8380fe9
Compare
I remembered I want to update the issue in the lint to point at a tracking issue. I'll do a crater run tonight and fix it up in the morning. |
0a98537
to
cfa3471
Compare
Hmm. Did a crater run without the improvements to subtyping and was started by the results. My memory is that (with the lint set to deny) we got 4 root regressions before, but now I see 73: https://gist.github.com/nikomatsakis/2b324ddc0d68c90ccbafb8f71e812344 |
I am running a new crater run using the more correct subtyping rules to reconfirm (ti's possible that crates.io changed, or perhaps that those are timeouts actually). |
OK I looked a bit more closely. The results are not timeouts (though there was one). They are a mix of expected lint errors but also some unexpected type errors -- most of them are in fact in the nom crate, despite crater reporting them as a "root regression". I will investigate a bit. |
We ought not to be affecting inference state when assembling candidates, so invoke select inside of a probe.
8debd69
to
90ff7dd
Compare
In an effort to just land something dang it, I've pared this branch way back. It is now just warning at the declaration site for types and where-clauses that are clearly invalid. Doing a make check to make sure I didn't mess something up, but this is a subset of the previous code. |
Result from the crater run with the changes to subtyping: https://gist.github.com/nikomatsakis/4edf5ef8f7bf65bbb2029c05b46f7818 10 root regressions. More than before; so it's definitely important to start landing something. |
But a good number of those are these errors that I don't fully understand, so I'd rather not land said changes now... |
This is a step towards fixing rust-lang#32330. The full fix would be a breaking change, so we begin by issuing warnings for scenarios that will break.
90ff7dd
to
639890d
Compare
@bors r=aturon |
📌 Commit 639890d has been approved by |
…rning-2, r=aturon Warnings for issue #32330 This is an extension of the previous PR that issues warnings in more situations than before. It does not handle *all* cases of #32330 but I believe it issues warnings for all cases I've seen in practice. Before merging I'd like to address: - open a good issue explaining the problem and how to fix it (I have a [draft writeup][]) - work on the error message, which I think is not as clear as it could/should be (suggestions welcome) r? @aturon [draft writeup]: https://gist.github.com/nikomatsakis/631ec8b4af9a18b5d062d9d9b7d3d967
This is an extension of the previous PR that issues warnings in more situations than before. It does not handle all cases of #32330 but I believe it issues warnings for all cases I've seen in practice.
Before merging I'd like to address:
r? @aturon