-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Range pattern does not perform type inference #88074
Comments
I don't think this is incorrect. |
Hmm, |
match 1 {
Zero::ZERO => {},
_ => {},
} and inference works just fine. The issue only happens when used in range patterns. I am prototyping a fix right now and it seems that the issue is just that E0029 check happens a little bit early (before unification is performed). |
Perform type inference in range pattern Fix rust-lang#88074
Perform type inference in range pattern Fix rust-lang#88074
Perform type inference in range pattern Fix rust-lang#88074
currently throws E0029:
while it should infer the constant to be
<i32 as Zero>::ZERO
.@rustbot modify labels: +T-compiler +A-inference
@rustbot claim
The text was updated successfully, but these errors were encountered: