Rollup merge of #37523 - d-unseductable:deref_mut_lifetimes, r=bluss

Elide lifetimes in DerefMut documentation

 - Elide lifetimes to increase the readability of `DerefMut` examples
This commit is contained in:
Jonathan Turner 2016-11-02 15:09:43 -04:00 committed by GitHub
commit 0befab2343

View File

@ -2484,13 +2484,13 @@ impl<'a, T: ?Sized> Deref for &'a mut T {
/// impl<T> Deref for DerefMutExample<T> {
/// type Target = T;
///
/// fn deref<'a>(&'a self) -> &'a T {
/// fn deref(&self) -> &T {
/// &self.value
/// }
/// }
///
/// impl<T> DerefMut for DerefMutExample<T> {
/// fn deref_mut<'a>(&'a mut self) -> &'a mut T {
/// fn deref_mut(&mut self) -> &mut T {
/// &mut self.value
/// }
/// }