Skip to content

Conversation

steveklabnik
Copy link
Contributor

These two traits are commonly confused. As such, explain the difference.

Fixes #24163

r? @aturon

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe you could include the output here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@aturon
Copy link
Contributor

aturon commented May 12, 2015

Sorry for the long delay...

This looks good! Other than making sure to emphasize that these are specifically for use with generics, you should also mention that Borrow should only be used when the source and target types will produce the same hash, compare the same, etc.

These two traits are commonly confused. As such, explain the difference.

Fixes rust-lang#24163
@steveklabnik
Copy link
Contributor Author

@bors: r=aturon rollup

@bors
Copy link
Collaborator

bors commented May 12, 2015

📌 Commit e780fb2 has been approved by aturon

steveklabnik added a commit to steveklabnik/rust that referenced this pull request May 12, 2015
These two traits are commonly confused. As such, explain the difference.

Fixes rust-lang#24163

r? @aturon
Manishearth added a commit to Manishearth/rust that referenced this pull request May 12, 2015
These two traits are commonly confused. As such, explain the difference.

Fixes rust-lang#24163

r? @aturon
bors added a commit that referenced this pull request May 12, 2015
@bors bors merged commit e780fb2 into rust-lang:master May 13, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve docs differentiating Borrow and AsRef
4 participants