-
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
Cleanup pattern type checking, fix diagnostics bugs (+ improvements) #67730
Conversation
The existing wording was inappropriate for e.g. `if let Ok(_) = expr { .. }`. The diagnostic would leak the fact that we desugar to a `match`.
TODO: The type is wrong and will be fixed in later commits.
Current name is too specific for incoming changes.
when type checking `<pat>`.
@@ -8,7 +8,7 @@ error[E0308]: mismatched types | |||
--> $DIR/exclusive_range_pattern_syntax_collision.rs:5:13 | |||
| | |||
LL | match [5..4, 99..105, 43..44] { | |||
| ----------------------- this match expression has type `std::ops::Range<{integer}>` | |||
| ----------------------- this expression has type `[std::ops::Range<{integer}>; 3]` |
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.
Here is the bug fix (it was saying that the array expression was in fact of a range type).
@@ -0,0 +1,49 @@ | |||
error[E0308]: mismatched types |
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.
The improvements (and in the other new tests).
@bors r=estebank |
📌 Commit 63dc0e4 has been approved by |
Cleanup pattern type checking, fix diagnostics bugs (+ improvements) r? @estebank
Rollup of 6 pull requests Successful merges: - #67574 (Extract `rustc_ast_lowering` crate from `rustc`) - #67685 (Constify Result) - #67702 (Add symbol normalization for proc_macro_server.) - #67730 (Cleanup pattern type checking, fix diagnostics bugs (+ improvements)) - #67744 (parser: reduce diversity in error handling mechanisms) - #67748 (Use function attribute "frame-pointer" instead of "no-frame-pointer-elim") Failed merges: r? @ghost
r? @estebank