Skip to content

Commit 6633988

Browse files
committed
Rollup merge of #28678 - fhartwig:deref-elide, r=steveklabnik
The lifetime can be elided here, and I think eliding it makes the example slightly simpler.
2 parents 2ec89c7 + c3a74fa commit 6633988

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libcore/ops.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1628,7 +1628,7 @@ impl<Idx: fmt::Debug> fmt::Debug for RangeTo<Idx> {
16281628
/// impl<T> Deref for DerefExample<T> {
16291629
/// type Target = T;
16301630
///
1631-
/// fn deref<'a>(&'a self) -> &'a T {
1631+
/// fn deref(&self) -> &T {
16321632
/// &self.value
16331633
/// }
16341634
/// }

0 commit comments

Comments
 (0)