]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_incremental/persist/fs.rs
Rollup merge of #70038 - DutchGhost:const-forget-tests, r=RalfJung
[rust.git] / src / librustc_incremental / persist / fs.rs
index ba20006d73cccf0f4866140bc8dd52379bf0a5de..4926f726f35935779407db28373def3eeaf241f4 100644 (file)
 //! unsupported file system and emit a warning in that case. This is not yet
 //! implemented.
 
-use rustc::session::{CrateDisambiguator, Session};
 use rustc_data_structures::fx::{FxHashMap, FxHashSet};
 use rustc_data_structures::svh::Svh;
 use rustc_data_structures::{base_n, flock};
 use rustc_fs_util::{link_or_copy, LinkOrCopy};
+use rustc_session::{CrateDisambiguator, Session};
 
 use std::fs as std_fs;
 use std::io;
@@ -152,7 +152,7 @@ pub fn lock_file_path(session_dir: &Path) -> PathBuf {
     let directory_name = session_dir.file_name().unwrap().to_string_lossy();
     assert_no_characters_lost(&directory_name);
 
-    let dash_indices: Vec<_> = directory_name.match_indices("-").map(|(idx, _)| idx).collect();
+    let dash_indices: Vec<_> = directory_name.match_indices('-').map(|(idx, _)| idx).collect();
     if dash_indices.len() != 3 {
         bug!(
             "Encountered incremental compilation session directory with \
@@ -342,7 +342,7 @@ pub fn finalize_session_directory(sess: &Session, svh: Svh) {
 
     // Keep the 's-{timestamp}-{random-number}' prefix, but replace the
     // '-working' part with the SVH of the crate
-    let dash_indices: Vec<_> = old_sub_dir_name.match_indices("-").map(|(idx, _)| idx).collect();
+    let dash_indices: Vec<_> = old_sub_dir_name.match_indices('-').map(|(idx, _)| idx).collect();
     if dash_indices.len() != 3 {
         bug!(
             "Encountered incremental compilation session directory with \
@@ -594,7 +594,7 @@ fn extract_timestamp_from_session_dir(directory_name: &str) -> Result<SystemTime
         return Err(());
     }
 
-    let dash_indices: Vec<_> = directory_name.match_indices("-").map(|(idx, _)| idx).collect();
+    let dash_indices: Vec<_> = directory_name.match_indices('-').map(|(idx, _)| idx).collect();
     if dash_indices.len() != 3 {
         return Err(());
     }