-
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
handle consts with param/infer in const_eval_resolve
better
#99618
Conversation
Some changes occurred in const_evaluatable.rs cc @lcnr Some changes occurred in src/tools/clippy cc @rust-lang/clippy |
2 nits, then r=me thanks ❤️ |
@lcnr can you take one last look at this? addressed the nits in the last commit, but I didn't know what to do when we had a |
if ct.has_infer_types_or_consts() || ct.has_param_types_or_consts() => | ||
{ | ||
let mut ty = ct.ty(); | ||
// If the type references param or infer, replace that too... |
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.
that should be unreachable, so you should be able to bug!
there
inference variables in the type of ty::Const
is something we can't deal with right now, so if we encounter them either:
- something went wrong and we should ICE
- my understanding of const generics is flawed, so i also want to know about that
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.
mkay
@bors r=lcnr |
handle consts with param/infer in `const_eval_resolve` better This PR addresses [this thread here](rust-lang#99449 (comment)). Was this the change you were looking for `@lcnr?` Interestingly, one test has begun to pass. Was that expected? r? `@lcnr`
Rollup of 5 pull requests Successful merges: - rust-lang#99618 (handle consts with param/infer in `const_eval_resolve` better) - rust-lang#99666 (Restore `Opaque` behavior to coherence check) - rust-lang#99692 (interpret, ptr_offset_from: refactor and test too-far-apart check) - rust-lang#99739 (Remove erroneous E0133 code from an error message.) - rust-lang#99748 (Use full type name instead of just saying `impl Trait` in "captures lifetime" error) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This PR addresses this thread here. Was this the change you were looking for @lcnr?
Interestingly, one test has begun to pass. Was that expected?
r? @lcnr