Uh oh!
There was an error while loading. Please reload this page.
Clarify docs on implementing Into. - #42126
Merged
Merged
Conversation
rust-highfive
commented
May 20, 2017
Contributor
(rust_highfive has picked a reviewer for you, use r? to override) |
dtolnay
commented
May 20, 2017
Member
This works when I tried it. https://play.rust-lang.org/?gist=29711851d1acb274cd4ba9fd3e05d781 structWrapper(String);implFrom<Wrapper>forString{fnfrom(w:Wrapper) -> String{
w.0}}fnmain(){} |
Mark-Simulacrum
commented
May 20, 2017
Member
Travis failed: |
steveklabnik
suggested changes
May 22, 2017
dtolnay
requested changes
May 22, 2017
dtolnay
left a comment
Member
There was a problem hiding this comment.
The compile_fail code block actually compiles fine.
shepmaster
commented
May 27, 2017
Member
@clarcharr a gentle reminder that this PR is awaiting your deft hand to fix the failures and respond to review feedback. |
clarfonthey
commented
May 27, 2017
ContributorAuthor
@shepmaster my deft hand has responded. |
Mark-Simulacrum
commented
May 28, 2017
Member
Looks like this still needs a few more updates to get Travis passing. |
clarfonthey
commented
May 28, 2017
ContributorAuthor
My deft hand failed me once again :( (fixed the error) |
clarfonthey
commented
May 28, 2017
ContributorAuthor
Rebased and made the changes. |
Mark-Simulacrum
approved these changes
May 28, 2017
Mark-Simulacrum
commented
May 28, 2017
Member
steveklabnik
approved these changes
May 30, 2017
steveklabnik
commented
May 30, 2017
Contributor
@bors: r+ rollup thanks! |
bors
commented
May 30, 2017
Collaborator
📌 Commit 54bbe23 has been approved by |
Mark-Simulacrum added a commit
to Mark-Simulacrum/rust
that referenced
this pull request
May 31, 2017
Clarify docs on implementing Into. This was suggested by @dtolnay in rust-lang#40380. This explicitly clarifies in what circumstances you should implement `Into` instead of `From`.
bors added a commit
that referenced
this pull request
May 31, 2017
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This was suggested by @dtolnay in #40380.
This explicitly clarifies in what circumstances you should implement
Intoinstead ofFrom.