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

parser: recover on &'lifetime mut? $pat. #67269

Merged
merged 1 commit into from
Dec 13, 2019

Conversation

Centril
Copy link
Contributor

@Centril Centril commented Dec 13, 2019

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 13, 2019
@Centril Centril changed the title parser: recover on &'lifetime mut $pat. parser: recover on &'lifetime mut? $pat. Dec 13, 2019
--> $DIR/lifetime-in-pattern.rs:1:16
|
LL | fn test(&'a str) {
| ^ expected one of `:`, `@`, or `|`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like something we should handle better :-/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the solution here is to make the type ascription optional syntactically. This would allow us to handle this in e.g. resolve or typeck to handle this well without any hacks.

@estebank
Copy link
Contributor

r=me once green and with nitpick addressed

@Centril Centril force-pushed the recover-lt-deref-pat branch from faf669e to 45c1e38 Compare December 13, 2019 01:36
@Centril
Copy link
Contributor Author

Centril commented Dec 13, 2019

@bors r=estebank rollup

@bors
Copy link
Contributor

bors commented Dec 13, 2019

📌 Commit 45c1e38 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 13, 2019
Centril added a commit to Centril/rust that referenced this pull request Dec 13, 2019
…ebank

parser: recover on `&'lifetime mut? $pat`.

r? @estebank
bors added a commit that referenced this pull request Dec 13, 2019
Rollup of 6 pull requests

Successful merges:

 - #66341 (Match `VecDeque::extend` to `Vec::extend_desugared`)
 - #67243 (LinkedList: drop remaining items when drop panics)
 - #67247 (Don't suggest wrong snippet in closure)
 - #67250 (Remove the `DelimSpan` from `NamedMatch::MatchedSeq`.)
 - #67251 (Require `allow_internal_unstable` for stable min_const_fn using unsta…)
 - #67269 (parser: recover on `&'lifetime mut? $pat`.)

Failed merges:

r? @ghost
@bors bors merged commit 45c1e38 into rust-lang:master Dec 13, 2019
@Centril Centril deleted the recover-lt-deref-pat branch December 13, 2019 11:29
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