about summary refs log tree commit diff
path: root/src/librustc_data_structures
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2017-11-06 04:29:23 -0500
committerNiko Matsakis <niko@alum.mit.edu>2017-11-16 05:57:45 -0500
commit09b44bbe77dd345e9c0f76dea0ea55e835729ef8 (patch)
tree56d90b6469d6315cc40500f26482e20856c78178 /src/librustc_data_structures
parent72675d82d7147c7de54f17e59b654d2f046d1cbd (diff)
downloadrust-09b44bbe77dd345e9c0f76dea0ea55e835729ef8.tar.gz
rust-09b44bbe77dd345e9c0f76dea0ea55e835729ef8.zip
IndexVec: add `'_` to make clear where borrowing is happening
Diffstat (limited to 'src/librustc_data_structures')
-rw-r--r--src/librustc_data_structures/indexed_vec.rs4
-rw-r--r--src/librustc_data_structures/lib.rs1
2 files changed, 3 insertions, 2 deletions
diff --git a/src/librustc_data_structures/indexed_vec.rs b/src/librustc_data_structures/indexed_vec.rs
index 622e8c51bee..e2f50c8c889 100644
--- a/src/librustc_data_structures/indexed_vec.rs
+++ b/src/librustc_data_structures/indexed_vec.rs
@@ -416,7 +416,7 @@ impl<I: Idx, T> IndexVec<I, T> {
     }
 
     #[inline]
-    pub fn iter_enumerated(&self) -> Enumerated<I, slice::Iter<T>>
+    pub fn iter_enumerated(&self) -> Enumerated<I, slice::Iter<'_, T>>
     {
         self.raw.iter().enumerate().map(IntoIdx { _marker: PhantomData })
     }
@@ -432,7 +432,7 @@ impl<I: Idx, T> IndexVec<I, T> {
     }
 
     #[inline]
-    pub fn iter_enumerated_mut(&mut self) -> Enumerated<I, slice::IterMut<T>>
+    pub fn iter_enumerated_mut(&mut self) -> Enumerated<I, slice::IterMut<'_, T>>
     {
         self.raw.iter_mut().enumerate().map(IntoIdx { _marker: PhantomData })
     }
diff --git a/src/librustc_data_structures/lib.rs b/src/librustc_data_structures/lib.rs
index 3a20343033c..8862ba3545e 100644
--- a/src/librustc_data_structures/lib.rs
+++ b/src/librustc_data_structures/lib.rs
@@ -31,6 +31,7 @@
 #![feature(i128)]
 #![feature(conservative_impl_trait)]
 #![feature(specialization)]
+#![feature(underscore_lifetimes)]
 
 #![cfg_attr(unix, feature(libc))]
 #![cfg_attr(test, feature(test))]