diff options
| author | Steve Klabnik <steve@steveklabnik.com> | 2015-04-30 14:40:38 -0400 |
|---|---|---|
| committer | Steve Klabnik <steve@steveklabnik.com> | 2015-05-12 10:53:50 -0400 |
| commit | e780fb270c5296a87ff9dc1442fc141f69e77fcd (patch) | |
| tree | f1868b9107a937a9dc01508d4d102acb57d276d2 /src/libcore | |
| parent | 0ad202671fc031ee90133fa5849ef0ec31164e04 (diff) | |
| download | rust-e780fb270c5296a87ff9dc1442fc141f69e77fcd.tar.gz rust-e780fb270c5296a87ff9dc1442fc141f69e77fcd.zip | |
TRPL: Borrow and AsRef
These two traits are commonly confused. As such, explain the difference. Fixes #24163
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/convert.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libcore/convert.rs b/src/libcore/convert.rs index da6ac6bd752..f6987c19664 100644 --- a/src/libcore/convert.rs +++ b/src/libcore/convert.rs @@ -24,6 +24,11 @@ use marker::Sized; /// A cheap, reference-to-reference conversion. /// +/// `AsRef` is very similar to, but different than, `Borrow`. See +/// [the book][book] for more. +/// +/// [book]: ../../book/borrow-and-asref.html +/// /// # Examples /// /// Both `String` and `&str` implement `AsRef<str>`: |
