about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-07-05 13:52:58 +0200
committerGitHub <noreply@github.com>2019-07-05 13:52:58 +0200
commit0f92eb8a4a7d8715381f5b5d748d22315f6ff9c7 (patch)
tree59ae3be626ef5728a794c2f570df15fd220b0807 /src/libcore
parentf119bf2761ab11ca577fac9881678c04d3e7fdb0 (diff)
parentfc67e5774df2ca5d5fdcf78835983b8c2ddb134d (diff)
downloadrust-0f92eb8a4a7d8715381f5b5d748d22315f6ff9c7.tar.gz
rust-0f92eb8a4a7d8715381f5b5d748d22315f6ff9c7.zip
Rollup merge of #62123 - jeremystucki:needless_lifetimes_std, r=alexcrichton
 Remove needless lifetimes (std)

Split from #62039
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/marker.rs2
-rw-r--r--src/libcore/ops/index.rs4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/libcore/marker.rs b/src/libcore/marker.rs
index d9757d78dce..39c390b4df6 100644
--- a/src/libcore/marker.rs
+++ b/src/libcore/marker.rs
@@ -498,7 +498,7 @@ macro_rules! impls{
 /// #     end: *const T,
 /// #     phantom: PhantomData<&'a T>,
 /// # }
-/// fn borrow_vec<'a, T>(vec: &'a Vec<T>) -> Slice<'a, T> {
+/// fn borrow_vec<T>(vec: &Vec<T>) -> Slice<'_, T> {
 ///     let ptr = vec.as_ptr();
 ///     Slice {
 ///         start: ptr,
diff --git a/src/libcore/ops/index.rs b/src/libcore/ops/index.rs
index 3158f58e958..9cff474a760 100644
--- a/src/libcore/ops/index.rs
+++ b/src/libcore/ops/index.rs
@@ -105,7 +105,7 @@ pub trait Index<Idx: ?Sized> {
 /// impl Index<Side> for Balance {
 ///     type Output = Weight;
 ///
-///     fn index<'a>(&'a self, index: Side) -> &'a Self::Output {
+///     fn index(&self, index: Side) -> &Self::Output {
 ///         println!("Accessing {:?}-side of balance immutably", index);
 ///         match index {
 ///             Side::Left => &self.left,
@@ -115,7 +115,7 @@ pub trait Index<Idx: ?Sized> {
 /// }
 ///
 /// impl IndexMut<Side> for Balance {
-///     fn index_mut<'a>(&'a mut self, index: Side) -> &'a mut Self::Output {
+///     fn index_mut(&mut self, index: Side) -> &mut Self::Output {
 ///         println!("Accessing {:?}-side of balance mutably", index);
 ///         match index {
 ///             Side::Left => &mut self.left,