Skip to content

Commit d664b89

Browse files
committed
Rewrite the documentation for BorrowMut.
1 parent 5bef034 commit d664b89

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/libcore/borrow.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,11 @@ pub trait Borrow<Borrowed: ?Sized> {
191191

192192
/// A trait for mutably borrowing data.
193193
///
194-
/// Similar to `Borrow`, but for mutable borrows.
194+
/// As a companion to [`Borrow<T>`] this trait allows a type to borrow as
195+
/// an underlying type by providing a mutable reference. See [`Borrow<T>`]
196+
/// for more information on borrowing as another type.
197+
///
198+
/// [`Borrow<T>`]: trait.Borrow.html
195199
#[stable(feature = "rust1", since = "1.0.0")]
196200
pub trait BorrowMut<Borrowed: ?Sized> : Borrow<Borrowed> {
197201
/// Mutably borrows from an owned value.

0 commit comments

Comments
 (0)