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.
This commit is contained in:
commit
66339884df
1 changed files with 1 additions and 1 deletions
|
|
@ -1628,7 +1628,7 @@ impl<Idx: fmt::Debug> fmt::Debug for RangeTo<Idx> {
|
|||
/// impl<T> Deref for DerefExample<T> {
|
||||
/// type Target = T;
|
||||
///
|
||||
/// fn deref<'a>(&'a self) -> &'a T {
|
||||
/// fn deref(&self) -> &T {
|
||||
/// &self.value
|
||||
/// }
|
||||
/// }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue