Skip to content

Add "dereference boxed value" suggestion. #57783

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

Merged
merged 1 commit into from
Jan 21, 2019
Merged

Conversation

davidtwco
Copy link
Member

@davidtwco davidtwco commented Jan 20, 2019

Fix #57741.

This PR adds a help: consider dereferencing the boxed value suggestion to discriminants of match statements when the match arms have type T and the discriminant has type Box<T>.

r? @estebank

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 20, 2019
This commit adds a `help: consider dereferencing the boxed value`
suggestion to discriminants of match statements when the match arms have
type `T` and the discriminant has type `Box<T>`.
@estebank
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented Jan 20, 2019

📌 Commit f13fe5f 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 Jan 20, 2019
Centril added a commit to Centril/rust that referenced this pull request Jan 21, 2019
Add "dereference boxed value" suggestion.

Contributes to rust-lang#57741.

This PR adds a `help: consider dereferencing the boxed value` suggestion to discriminants of match statements when the match arms have type `T` and the discriminant has type `Box<T>`.

r? @estebank
bors added a commit that referenced this pull request Jan 21, 2019
Rollup of 5 pull requests

Successful merges:

 - #56796 (Change bounds on `TryFrom` blanket impl to use `Into` instead of `From`)
 - #57768 (Continue parsing after parent type args and suggest using angle brackets)
 - #57769 (Suggest correct cast for struct fields with shorthand syntax)
 - #57783 (Add "dereference boxed value" suggestion.)
 - #57784 (Add span for bad doc comment)

Failed merges:

r? @ghost
@bors bors merged commit f13fe5f into rust-lang:master Jan 21, 2019
@davidtwco davidtwco deleted the issue-57741 branch January 21, 2019 12:30
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