]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_passes/hir_stats.rs
Auto merge of #56838 - Aaron1011:fix/rustdoc-infer-unify, r=nikomatsakis
[rust.git] / src / librustc_passes / hir_stats.rs
index b65a2e3f0e5306f3033f71269c2e0db136a5c07c..604b31e7167a971dd6b13fe7b10e1860c0c70fa5 100644 (file)
@@ -1,13 +1,3 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
 // The visitors in this module collect sizes and counts of the most important
 // pieces of AST and HIR. The resulting numbers are good approximations but not
 // completely accurate (some things might be counted twice, others missed).
@@ -41,8 +31,8 @@ struct StatCollector<'k> {
 pub fn print_hir_stats(krate: &hir::Crate) {
     let mut collector = StatCollector {
         krate: Some(krate),
-        data: FxHashMap(),
-        seen: FxHashSet(),
+        data: FxHashMap::default(),
+        seen: FxHashSet::default(),
     };
     hir_visit::walk_crate(&mut collector, krate);
     collector.print("HIR STATS");
@@ -51,8 +41,8 @@ pub fn print_hir_stats(krate: &hir::Crate) {
 pub fn print_ast_stats<'v>(krate: &'v ast::Crate, title: &str) {
     let mut collector = StatCollector {
         krate: None,
-        data: FxHashMap(),
-        seen: FxHashSet(),
+        data: FxHashMap::default(),
+        seen: FxHashSet::default(),
     };
     ast_visit::walk_crate(&mut collector, krate);
     collector.print(title);