-
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
Fix const-generics ICE related to binding #86795
Conversation
This comment has been minimized.
This comment has been minimized.
So, unfortunately this isn't correct :/ As you can see from the failed test, this indeed is a tricky case (see https://github.com/rust-lang/rust/pull/83825/files#diff-a54c982c1e255569ddede4404cdf85ecfbd93c20edfa8a090a5f2dc2bc1dff6bR119 where we were going to just shunt that I knew that Ultimately, the "solution" is to either 1) not be creating bound vars (I'm not familiar with the originating code) or 2) Ensure that we also keep the @camelid thinks that these are originating from the coherence code, but hasn't been able to track down more specifically. One alternative to "fix" things for now, is to move |
Thanks for checking!
Could we achieve this by following? - let bound_vars = tcx
- .mk_bound_variable_kinds(std::iter::once(ty::BoundVariableKind::Region(ty::BrAnon(0))));
+ let bound_vars = trait_ref.to_poly_trait_ref().bound_vars(); And it's odd not to reproduce the issue-64494's failure on my local, how could I reproduce it? |
Okay, moved |
This comment has been minimized.
This comment has been minimized.
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.
I think I would rather this completely subsume the other PR, rather than just duplicate BoundVarsCollector
(honestly, should be pretty quick).
Nope! If you look at
Weid. When I do |
Thanks for the pointer! Pulled the changes from that PR applying your review comments.
Hmm, then maybe my config.toml or something else is wrong. For now, I'm using CI here for testing. |
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.
Some comments. Sorry this ended up being a bit more involved than you probably expected. 🙃
Co-authored-by: Noah Lev <camelidcamel@gmail.com>
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.
One small change (it gets removed in #85499 anyways, but would rather not make that here)
Then LGTM!
📌 Commit 58f6cb4 has been approved by |
⌛ Testing commit 58f6cb4 with merge b3af93d71879ea99014f96f89d1179326b25447b... |
💔 Test failed - checks-actions |
@bors retry |
☀️ Test successful - checks-actions |
Fixes #83765, fixes #85848
r? @jackh726 as you're familiar with
Binding
. I'd like to get some views if the current approach is right path.