about summary refs log tree commit diff
path: root/compiler/rustc_session/src/search_paths.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_session/src/search_paths.rs')
-rw-r--r--compiler/rustc_session/src/search_paths.rs19
1 files changed, 9 insertions, 10 deletions
diff --git a/compiler/rustc_session/src/search_paths.rs b/compiler/rustc_session/src/search_paths.rs
index 78473fccd2d..00e12b45baf 100644
--- a/compiler/rustc_session/src/search_paths.rs
+++ b/compiler/rustc_session/src/search_paths.rs
@@ -20,12 +20,11 @@ pub struct FilesIndex(Vec<(Arc<str>, SearchPathFile)>);
 
 impl FilesIndex {
     /// Look up [SearchPathFile] by (prefix, suffix) pair.
-    pub fn query<'this, 'prefix, 'suffix>(
-        &'this self,
-        prefix: &'prefix str,
-        suffix: &'suffix str,
-    ) -> Option<impl Iterator<Item = (String, &'this SearchPathFile)> + use<'this, 'prefix, 'suffix>>
-    {
+    pub fn query<'s>(
+        &'s self,
+        prefix: &str,
+        suffix: &str,
+    ) -> Option<impl Iterator<Item = (String, &'s SearchPathFile)>> {
         let start = self.0.partition_point(|(k, _)| **k < *prefix);
         if start == self.0.len() {
             return None;
@@ -140,10 +139,10 @@ impl SearchPath {
                     e.ok().and_then(|e| {
                         e.file_name().to_str().map(|s| {
                             let file_name_str: Arc<str> = s.into();
-                            (Arc::clone(&file_name_str), SearchPathFile {
-                                path: e.path().into(),
-                                file_name_str,
-                            })
+                            (
+                                Arc::clone(&file_name_str),
+                                SearchPathFile { path: e.path().into(), file_name_str },
+                            )
                         })
                     })
                 })