Rollup merge of #48003 - mbrubeck:docs, r=steveklabnik

Fix info about generic impls in AsMut docs

This text was copy-pasted from the `AsRef` docs to `AsMut`, but needed some additional adjustments for correctness.
This commit is contained in:
kennytm 2018-02-06 02:13:54 +08:00 committed by GitHub
commit e2f6e134c1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -141,9 +141,9 @@ pub trait AsRef<T: ?Sized> {
///
/// # Generic Implementations
///
/// - `AsMut` auto-dereferences if the inner type is a reference or a mutable
/// reference (e.g.: `foo.as_ref()` will work the same if `foo` has type
/// `&mut Foo` or `&&mut Foo`)
/// - `AsMut` auto-dereferences if the inner type is a mutable reference
/// (e.g.: `foo.as_mut()` will work the same if `foo` has type `&mut Foo`
/// or `&mut &mut Foo`)
///
/// # Examples
///