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:
commit
0befab2343
@ -2484,13 +2484,13 @@ impl<'a, T: ?Sized> Deref for &'a mut T {
|
|||||||
/// impl<T> Deref for DerefMutExample<T> {
|
/// impl<T> Deref for DerefMutExample<T> {
|
||||||
/// type Target = T;
|
/// type Target = T;
|
||||||
///
|
///
|
||||||
/// fn deref<'a>(&'a self) -> &'a T {
|
/// fn deref(&self) -> &T {
|
||||||
/// &self.value
|
/// &self.value
|
||||||
/// }
|
/// }
|
||||||
/// }
|
/// }
|
||||||
///
|
///
|
||||||
/// impl<T> DerefMut for DerefMutExample<T> {
|
/// 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
|
/// &mut self.value
|
||||||
/// }
|
/// }
|
||||||
/// }
|
/// }
|
||||||
|
Loading…
Reference in New Issue
Block a user