Skip to content
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

Merged
merged 10 commits into from
Dec 31, 2019

Conversation

Centril
Copy link
Contributor

@Centril Centril commented Dec 30, 2019

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.
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 30, 2019
@@ -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]`
Copy link
Contributor Author

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
Copy link
Contributor Author

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).

@Centril
Copy link
Contributor Author

Centril commented Dec 31, 2019

@bors r=estebank

@bors
Copy link
Contributor

bors commented Dec 31, 2019

📌 Commit 63dc0e4 has been approved by estebank

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 31, 2019
Centril added a commit to Centril/rust that referenced this pull request Dec 31, 2019
Cleanup pattern type checking, fix diagnostics bugs (+ improvements)

r? @estebank
bors added a commit that referenced this pull request Dec 31, 2019
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
@bors bors merged commit 63dc0e4 into rust-lang:master Dec 31, 2019
@Centril Centril deleted the typeck-pat-cleanup branch December 31, 2019 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants