-
Notifications
You must be signed in to change notification settings - Fork 182
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
Properly unify consts with vars #598
Conversation
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 comment. These seem mostly copied from the Ty
cases, and that makes sense to me. But I would really like a second look from @nikomatsakis or maybe @Areredify in terms of whether this is actually correct (and why it was left out of the original PR i.e. was it just oversight or something else)
chalk-solve/src/infer/unify.rs
Outdated
self.table | ||
.unify | ||
.unify_var_value(var, InferenceValue::from_const(interner, c.clone())) | ||
.unify_var_value(var, InferenceValue::from_const(interner, c1.clone())) |
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.
Does this actually need to be a clone? The line below uses c
(though should probably be c1
), but we could print that before this.
Oh yeah, it was most certainly an oversight. I actually saw it when working on universe canonicalization but forgot to push it separately |
@bors r+ book links are broken with latest rust directory moving around business, but we can leave that for another PR |
📌 Commit 584ddfe has been approved by |
☀️ Test successful - checks-actions |
Before, we incorrectly unified consts with vars unconditionally.
Fixes #597.