about summary refs log tree commit diff
path: root/src/librustc_incremental/persist
diff options
context:
space:
mode:
Diffstat (limited to 'src/librustc_incremental/persist')
-rw-r--r--src/librustc_incremental/persist/dirty_clean.rs2
-rw-r--r--src/librustc_incremental/persist/fs.rs14
-rw-r--r--src/librustc_incremental/persist/load.rs8
-rw-r--r--src/librustc_incremental/persist/save.rs2
4 files changed, 13 insertions, 13 deletions
diff --git a/src/librustc_incremental/persist/dirty_clean.rs b/src/librustc_incremental/persist/dirty_clean.rs
index 1b3819474c2..58a799bb45f 100644
--- a/src/librustc_incremental/persist/dirty_clean.rs
+++ b/src/librustc_incremental/persist/dirty_clean.rs
@@ -226,7 +226,7 @@ pub fn check_dirty_clean_annotations<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>) {
         let krate = tcx.hir.krate();
         let mut dirty_clean_visitor = DirtyCleanVisitor {
             tcx,
-            checked_attrs: FxHashSet(),
+            checked_attrs: Default::default(),
         };
         krate.visit_all_item_likes(&mut dirty_clean_visitor);
 
diff --git a/src/librustc_incremental/persist/fs.rs b/src/librustc_incremental/persist/fs.rs
index ec25aef8080..2a8a0baf571 100644
--- a/src/librustc_incremental/persist/fs.rs
+++ b/src/librustc_incremental/persist/fs.rs
@@ -219,7 +219,7 @@ pub fn prepare_session_directory(sess: &Session,
         }
     };
 
-    let mut source_directories_already_tried = FxHashSet();
+    let mut source_directories_already_tried = FxHashSet::default();
 
     loop {
         // Generate a session directory of the form:
@@ -490,7 +490,7 @@ fn create_dir(sess: &Session, path: &Path, dir_tag: &str) -> Result<(),()> {
     }
 }
 
-/// Allocate a the lock-file and lock it.
+/// Allocate the lock-file and lock it.
 fn lock_directory(sess: &Session,
                   session_dir: &Path)
                   -> Result<(flock::Lock, PathBuf), ()> {
@@ -656,8 +656,8 @@ pub fn garbage_collect_session_directories(sess: &Session) -> io::Result<()> {
 
     // First do a pass over the crate directory, collecting lock files and
     // session directories
-    let mut session_directories = FxHashSet();
-    let mut lock_files = FxHashSet();
+    let mut session_directories = FxHashSet::default();
+    let mut lock_files = FxHashSet::default();
 
     for dir_entry in try!(crate_directory.read_dir()) {
         let dir_entry = match dir_entry {
@@ -875,7 +875,7 @@ fn all_except_most_recent(deletion_candidates: Vec<(SystemTime, PathBuf, Option<
                            .map(|(_, path, lock)| (path, lock))
                            .collect()
     } else {
-        FxHashMap()
+        FxHashMap::default()
     }
 }
 
@@ -924,7 +924,7 @@ fn test_all_except_most_recent() {
     assert_eq!(all_except_most_recent(
         vec![
         ]).keys().cloned().collect::<FxHashSet<PathBuf>>(),
-        FxHashSet()
+        FxHashSet::default()
     );
 }
 
@@ -939,7 +939,7 @@ fn test_timestamp_serialization() {
 
 #[test]
 fn test_find_source_directory_in_iter() {
-    let already_visited = FxHashSet();
+    let already_visited = FxHashSet::default();
 
     // Find newest
     assert_eq!(find_source_directory_in_iter(
diff --git a/src/librustc_incremental/persist/load.rs b/src/librustc_incremental/persist/load.rs
index fbc3bf03599..2f7e1af1ff6 100644
--- a/src/librustc_incremental/persist/load.rs
+++ b/src/librustc_incremental/persist/load.rs
@@ -48,7 +48,7 @@ impl LoadResult<(PreviousDepGraph, WorkProductMap)> {
         match self {
             LoadResult::Error { message } => {
                 sess.warn(&message);
-                (PreviousDepGraph::new(SerializedDepGraph::new()), FxHashMap())
+                Default::default()
             },
             LoadResult::DataOutOfDate => {
                 if let Err(err) = delete_all_session_dir_contents(sess) {
@@ -56,7 +56,7 @@ impl LoadResult<(PreviousDepGraph, WorkProductMap)> {
                                       incremental compilation session directory contents `{}`: {}.",
                                       dep_graph_path(sess).display(), err));
                 }
-                (PreviousDepGraph::new(SerializedDepGraph::new()), FxHashMap())
+                Default::default()
             }
             LoadResult::Ok { data } => data
         }
@@ -117,7 +117,7 @@ pub fn load_dep_graph(sess: &Session) ->
     if sess.opts.incremental.is_none() {
         // No incremental compilation.
         return MaybeAsync::Sync(LoadResult::Ok {
-            data: (PreviousDepGraph::new(SerializedDepGraph::new()), FxHashMap())
+            data: Default::default(),
         });
     }
 
@@ -127,7 +127,7 @@ pub fn load_dep_graph(sess: &Session) ->
     let report_incremental_info = sess.opts.debugging_opts.incremental_info;
     let expected_hash = sess.opts.dep_tracking_hash();
 
-    let mut prev_work_products = FxHashMap();
+    let mut prev_work_products = FxHashMap::default();
 
     // If we are only building with -Zquery-dep-graph but without an actual
     // incr. comp. session directory, we skip this. Otherwise we'd fail
diff --git a/src/librustc_incremental/persist/save.rs b/src/librustc_incremental/persist/save.rs
index 06b0ea946d7..6279df4e580 100644
--- a/src/librustc_incremental/persist/save.rs
+++ b/src/librustc_incremental/persist/save.rs
@@ -162,7 +162,7 @@ fn encode_dep_graph(tcx: TyCtxt,
         let (total_edge_reads, total_duplicate_edge_reads) =
             tcx.dep_graph.edge_deduplication_data();
 
-        let mut counts: FxHashMap<_, Stat> = FxHashMap();
+        let mut counts: FxHashMap<_, Stat> = FxHashMap::default();
 
         for (i, &node) in serialized_graph.nodes.iter_enumerated() {
             let stat = counts.entry(node.kind).or_insert(Stat {