Skip to content

Commit

Permalink
Rollup merge of #37523 - d-unseductable:deref_mut_lifetimes, r=bluss
Browse files Browse the repository at this point in the history
Elide lifetimes in DerefMut documentation

 - Elide lifetimes to increase the readability of `DerefMut` examples
  • Loading branch information
Jonathan Turner committed Nov 2, 2016
2 parents 805aecc + 7d5b788 commit 0befab2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libcore/ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
/// }
/// }
Expand Down

0 comments on commit 0befab2

Please sign in to comment.