about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorJonathan Turner <jonathandturner@users.noreply.github.com>2016-11-02 15:09:43 -0400
committerGitHub <noreply@github.com>2016-11-02 15:09:43 -0400
commit0befab23435fe6490ae2de30378f9bc834fcc1a8 (patch)
treec294643a3b5f7f6ccee7d331c75e73f245f74e76 /src/libcore
parent805aecc36ae5bcb7c381915d60a0572706daf27e (diff)
parent7d5b788edffc447946e8c27d683e8604b59443c5 (diff)
downloadrust-0befab23435fe6490ae2de30378f9bc834fcc1a8.tar.gz
rust-0befab23435fe6490ae2de30378f9bc834fcc1a8.zip
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
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/ops.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcore/ops.rs b/src/libcore/ops.rs
index e177963fade..06838ee89bd 100644
--- a/src/libcore/ops.rs
+++ b/src/libcore/ops.rs
@@ -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
 ///     }
 /// }