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

Rollup of 5 pull requests #57792

Merged
merged 20 commits into from
Jan 21, 2019
Merged

Rollup of 5 pull requests #57792

merged 20 commits into from
Jan 21, 2019

Conversation

Centril
Copy link
Contributor

@Centril Centril commented Jan 21, 2019

Successful merges:

Failed merges:

r? @ghost

RustyYato and others added 20 commits December 13, 2018 16:53
Reason: Due to changes in bounds of `TryFrom` from `From` to `Into`
i.e. `Box`, instead it now uses `Vec`
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>`.
…, r=shepmaster

Change bounds on `TryFrom` blanket impl to use `Into` instead of `From`

This is from this [comment](rust-lang#33417 (comment)) I made.

This will expand the impls available for `TryFrom` and `TryInto`, without losing anything in the process.
Continue parsing after parent type args and suggest using angle brackets

```
error[E0214]: parenthesized parameters may only be used with a trait
--> $DIR/E0214.rs:2:15
   |
LL |     let v: Vec(&str) = vec!["foo"];
   |               ^^^^^^
   |               |
   |               only traits may use parentheses
   |               help: use angle brackets instead: `<&str>`
```

r? @zackmdavis
…ld, r=matthewjasper

Suggest correct cast for struct fields with shorthand syntax

```
error[E0308]: mismatched types
  --> $DIR/type-mismatch-struct-field-shorthand.rs:8:19
   |
LL |     let _ = RGB { r, g, b };
   |                   ^ expected f64, found f32
help: you can cast an `f32` to `f64` in a lossless way
   |
LL |     let _ = RGB { r: r.into(), g, b };
   |                   ^^^^^^^^^^^
```

Fix rust-lang#52497.
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
@Centril
Copy link
Contributor Author

Centril commented Jan 21, 2019

@bors r+ p=5

@bors
Copy link
Contributor

bors commented Jan 21, 2019

📌 Commit 00c60d1 has been approved by Centril

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jan 21, 2019
@bors
Copy link
Contributor

bors commented Jan 21, 2019

⌛ Testing commit 00c60d1 with merge 33b0b71...

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

bors commented Jan 21, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: Centril
Pushing 33b0b71 to master...

@bors bors merged commit 00c60d1 into rust-lang:master Jan 21, 2019
@Centril Centril added the rollup A PR which is a rollup label Oct 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup 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.

6 participants