Skip to content

Add "dereference boxed value" suggestion. - #57783

Merged
bors merged 1 commit into
rust-lang:masterfrom
davidtwco:issue-57741
Jan 21, 2019
Merged

Add "dereference boxed value" suggestion.#57783
bors merged 1 commit into
rust-lang:masterfrom
davidtwco:issue-57741

Conversation

@davidtwco

@davidtwcodavidtwco commented Jan 20, 2019

Copy link
Copy Markdown
Member

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-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 20, 2019
Comment threadsrc/librustc/infer/error_reporting/mod.rs Outdated
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
Copy Markdown
Contributor

@bors r+

@bors

bors commented Jan 20, 2019

Copy link
Copy Markdown
Collaborator

📌 Commit f13fe5f has been approved by estebank

@borsbors 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
@CentrilCentril mentioned this pull request Jan 21, 2019
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:masterJan 21, 2019
@davidtwco
davidtwco deleted the issue-57741 branch January 21, 2019 12:30
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: 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

@davidtwco@estebank@bors@rust-highfive