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

Conversation

Projects
None yet
6 participants
@Centril
Copy link
Contributor

Centril commented Jan 21, 2019

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

KrishnaSannasi and others added some commits Dec 13, 2018

Changed expected error message for TryFrom
Reason: Due to changes in bounds of `TryFrom` from `From` to `Into`
fixed test, now it doesn't use a fundemental type
i.e. `Box`, instead it now uses `Vec`
Add "dereference boxed value" suggestion.
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>`.
Rollup merge of #56796 - KrishnaSannasi:try_from_impl_change, r=shepm…
…aster

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

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

This will expand the impls available for `TryFrom` and `TryInto`, without losing anything in the process.
Rollup merge of #57768 - estebank:type-args-sugg, r=zackmdavis
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
Rollup merge of #57769 - estebank:cast-suggestion-struct-field, r=mat…
…thewjasper

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 #52497.
Rollup merge of #57783 - davidtwco:issue-57741, r=estebank
Add "dereference boxed value" suggestion.

Contributes to #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

This comment has been minimized.

Copy link
Contributor Author

Centril commented Jan 21, 2019

@bors r+ p=5

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 21, 2019

📌 Commit 00c60d1 has been approved by Centril

@bors

This comment has been minimized.

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

Auto merge of #57792 - Centril:rollup, r=Centril
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

This comment has been minimized.

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

1 check passed

homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.