-
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
Changed resolve_type_vars_with_obligations
to also resolve const inference variables
#65579
Conversation
@@ -29,7 +29,7 @@ impl<'a, 'tcx> TypeFolder<'tcx> for OpportunisticVarResolver<'a, 'tcx> { | |||
} | |||
|
|||
fn fold_ty(&mut self, t: Ty<'tcx>) -> Ty<'tcx> { | |||
if !t.has_infer_types() { | |||
if !t.has_infer_types() && !t.has_infer_consts() { |
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.
It might be a good idea if we audit other uses of has_infer_types
to make sure they don't also need to check has_infer_consts
…
This looks great, thanks! @bors r+ rollup |
📌 Commit 4b3333f352a3c0339f8536e781cf73ed45ef036c has been approved by |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
@varkor wrong label =P (F-const_generics is for the feature gate) |
@Skinny121: could you squash your last commit into your first one, as it just undoes a change there? (The second commit is fine as a separate commit.) |
resolve_vars_with_obligations, as it now also resolves const variables.
68c3c54
to
9cefcd3
Compare
@Skinny121: thank you! @bors r+ rollup |
📌 Commit 9cefcd3 has been approved by |
Changed `resolve_type_vars_with_obligations` to also resolve const inference variables Fixes rust-lang#65380 r? @varkor
Changed `resolve_type_vars_with_obligations` to also resolve const inference variables Fixes rust-lang#65380 r? @varkor
Rollup of 5 pull requests Successful merges: - #65460 (Clean up `contains()` `insert()` chains on HashSet) - #65463 (Avoid unnecessary arena allocations in `expand_pattern()`.) - #65579 (Changed `resolve_type_vars_with_obligations` to also resolve const inference variables) - #65605 (Remove unreachable unit tuple compare binop codegen) - #65626 (trivial typo fix) Failed merges: r? @ghost
Fixes #65380
r? @varkor