Skip to content

Commit 2262157

Browse files
author
Lukas Markeffsky
committed
remove explicit lifetime bounds from doc tests
1 parent 555e0af commit 2262157

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

library/alloc/src/borrow.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,11 @@ where
145145
/// ```
146146
/// use std::borrow::Cow;
147147
///
148-
/// struct Items<'a, X: 'a> where [X]: ToOwned<Owned = Vec<X>> {
148+
/// struct Items<'a, X> where [X]: ToOwned<Owned = Vec<X>> {
149149
/// values: Cow<'a, [X]>,
150150
/// }
151151
///
152-
/// impl<'a, X: Clone + 'a> Items<'a, X> where [X]: ToOwned<Owned = Vec<X>> {
152+
/// impl<'a, X: Clone> Items<'a, X> where [X]: ToOwned<Owned = Vec<X>> {
153153
/// fn new(v: Cow<'a, [X]>) -> Self {
154154
/// Items { values: v }
155155
/// }

library/core/src/fmt/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2283,12 +2283,12 @@ impl<'a> Formatter<'a> {
22832283
/// ```rust
22842284
/// use std::fmt;
22852285
///
2286-
/// struct Arm<'a, L: 'a, R: 'a>(&'a (L, R));
2287-
/// struct Table<'a, K: 'a, V: 'a>(&'a [(K, V)], V);
2286+
/// struct Arm<'a, L, R>(&'a (L, R));
2287+
/// struct Table<'a, K, V>(&'a [(K, V)], V);
22882288
///
22892289
/// impl<'a, L, R> fmt::Debug for Arm<'a, L, R>
22902290
/// where
2291-
/// L: 'a + fmt::Debug, R: 'a + fmt::Debug
2291+
/// L: fmt::Debug, R: fmt::Debug
22922292
/// {
22932293
/// fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
22942294
/// L::fmt(&(self.0).0, fmt)?;
@@ -2299,7 +2299,7 @@ impl<'a> Formatter<'a> {
22992299
///
23002300
/// impl<'a, K, V> fmt::Debug for Table<'a, K, V>
23012301
/// where
2302-
/// K: 'a + fmt::Debug, V: 'a + fmt::Debug
2302+
/// K: fmt::Debug, V: fmt::Debug
23032303
/// {
23042304
/// fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
23052305
/// fmt.debug_set()

0 commit comments

Comments
 (0)