diff options
| author | Oliver Scherer <github35764891676564198441@oli-obk.de> | 2018-10-16 10:44:26 +0200 |
|---|---|---|
| committer | Oliver Scherer <github35764891676564198441@oli-obk.de> | 2018-10-19 14:34:44 +0200 |
| commit | ee81739dc1e0f1c4dff9480b52528fb688ef9251 (patch) | |
| tree | 8d0b81036ac5d144394a8e324e539072e4541d8e /src/librustc_codegen_llvm | |
| parent | 74ff7dcb1388e60a613cd6050bcd372a3cc4998b (diff) | |
| download | rust-ee81739dc1e0f1c4dff9480b52528fb688ef9251.tar.gz rust-ee81739dc1e0f1c4dff9480b52528fb688ef9251.zip | |
Deprecate the `FxHashMap()` and `FxHashSet()` constructor function hack
Diffstat (limited to 'src/librustc_codegen_llvm')
| -rw-r--r-- | src/librustc_codegen_llvm/attributes.rs | 2 | ||||
| -rw-r--r-- | src/librustc_codegen_llvm/back/link.rs | 2 | ||||
| -rw-r--r-- | src/librustc_codegen_llvm/back/lto.rs | 4 | ||||
| -rw-r--r-- | src/librustc_codegen_llvm/back/write.rs | 2 | ||||
| -rw-r--r-- | src/librustc_codegen_llvm/base.rs | 16 | ||||
| -rw-r--r-- | src/librustc_codegen_llvm/context.rs | 18 | ||||
| -rw-r--r-- | src/librustc_codegen_llvm/debuginfo/metadata.rs | 6 | ||||
| -rw-r--r-- | src/librustc_codegen_llvm/debuginfo/mod.rs | 6 |
8 files changed, 28 insertions, 28 deletions
diff --git a/src/librustc_codegen_llvm/attributes.rs b/src/librustc_codegen_llvm/attributes.rs index 90ba103ca4c..a09a2b0fc4f 100644 --- a/src/librustc_codegen_llvm/attributes.rs +++ b/src/librustc_codegen_llvm/attributes.rs @@ -297,7 +297,7 @@ pub fn provide_extern(providers: &mut Providers) { } ).collect::<FxHashMap<_, _>>(); - let mut ret = FxHashMap(); + let mut ret = FxHashMap::default(); for lib in tcx.foreign_modules(cnum).iter() { let module = def_id_to_native_lib .get(&lib.def_id) diff --git a/src/librustc_codegen_llvm/back/link.rs b/src/librustc_codegen_llvm/back/link.rs index 9fac343b846..86c6a5e65b0 100644 --- a/src/librustc_codegen_llvm/back/link.rs +++ b/src/librustc_codegen_llvm/back/link.rs @@ -1313,7 +1313,7 @@ fn add_upstream_rust_crates(cmd: &mut dyn Linker, // for the current implementation of the standard library. let mut group_end = None; let mut group_start = None; - let mut end_with = FxHashSet(); + let mut end_with = FxHashSet::default(); let info = &codegen_results.crate_info; for &(cnum, _) in deps.iter().rev() { if let Some(missing) = info.missing_lang_items.get(&cnum) { diff --git a/src/librustc_codegen_llvm/back/lto.rs b/src/librustc_codegen_llvm/back/lto.rs index 3ac22f4eaef..f648efb47df 100644 --- a/src/librustc_codegen_llvm/back/lto.rs +++ b/src/librustc_codegen_llvm/back/lto.rs @@ -882,7 +882,7 @@ pub struct ThinLTOImports { impl ThinLTOImports { fn new() -> ThinLTOImports { ThinLTOImports { - imports: FxHashMap(), + imports: FxHashMap::default(), } } @@ -911,7 +911,7 @@ impl ThinLTOImports { .push(imported_module_name.to_owned()); } let mut map = ThinLTOImports { - imports: FxHashMap(), + imports: FxHashMap::default(), }; llvm::LLVMRustGetThinLTOModuleImports(data, imported_module_callback, diff --git a/src/librustc_codegen_llvm/back/write.rs b/src/librustc_codegen_llvm/back/write.rs index 95281e2445a..81619c21975 100644 --- a/src/librustc_codegen_llvm/back/write.rs +++ b/src/librustc_codegen_llvm/back/write.rs @@ -1540,7 +1540,7 @@ fn start_executing_work(tcx: TyCtxt, // Compute the set of symbols we need to retain when doing LTO (if we need to) let exported_symbols = { - let mut exported_symbols = FxHashMap(); + let mut exported_symbols = FxHashMap::default(); let copy_symbols = |cnum| { let symbols = tcx.exported_symbols(cnum) diff --git a/src/librustc_codegen_llvm/base.rs b/src/librustc_codegen_llvm/base.rs index c814ab4ab67..5356014f671 100644 --- a/src/librustc_codegen_llvm/base.rs +++ b/src/librustc_codegen_llvm/base.rs @@ -1030,7 +1030,7 @@ fn collect_and_partition_mono_items<'a, 'tcx>( }).collect(); if tcx.sess.opts.debugging_opts.print_mono_items.is_some() { - let mut item_to_cgus: FxHashMap<_, Vec<_>> = FxHashMap(); + let mut item_to_cgus: FxHashMap<_, Vec<_>> = FxHashMap::default(); for cgu in &codegen_units { for (&mono_item, &linkage) in cgu.items() { @@ -1092,17 +1092,17 @@ impl CrateInfo { compiler_builtins: None, profiler_runtime: None, sanitizer_runtime: None, - is_no_builtins: FxHashSet(), - native_libraries: FxHashMap(), + is_no_builtins: FxHashSet::default(), + native_libraries: FxHashMap::default(), used_libraries: tcx.native_libraries(LOCAL_CRATE), link_args: tcx.link_args(LOCAL_CRATE), - crate_name: FxHashMap(), + crate_name: FxHashMap::default(), used_crates_dynamic: cstore::used_crates(tcx, LinkagePreference::RequireDynamic), used_crates_static: cstore::used_crates(tcx, LinkagePreference::RequireStatic), - used_crate_source: FxHashMap(), - wasm_imports: FxHashMap(), - lang_item_to_crate: FxHashMap(), - missing_lang_items: FxHashMap(), + used_crate_source: FxHashMap::default(), + wasm_imports: FxHashMap::default(), + lang_item_to_crate: FxHashMap::default(), + missing_lang_items: FxHashMap::default(), }; let lang_items = tcx.lang_items(); diff --git a/src/librustc_codegen_llvm/context.rs b/src/librustc_codegen_llvm/context.rs index e6197423738..559ca6f0dfe 100644 --- a/src/librustc_codegen_llvm/context.rs +++ b/src/librustc_codegen_llvm/context.rs @@ -295,22 +295,22 @@ impl<'a, 'tcx> CodegenCx<'a, 'tcx> { llcx, stats: RefCell::new(Stats::default()), codegen_unit, - instances: RefCell::new(FxHashMap()), - vtables: RefCell::new(FxHashMap()), - const_cstr_cache: RefCell::new(FxHashMap()), - const_unsized: RefCell::new(FxHashMap()), - const_globals: RefCell::new(FxHashMap()), + instances: RefCell::new(FxHashMap::default()), + vtables: RefCell::new(FxHashMap::default()), + const_cstr_cache: RefCell::new(FxHashMap::default()), + const_unsized: RefCell::new(FxHashMap::default()), + const_globals: RefCell::new(FxHashMap::default()), statics_to_rauw: RefCell::new(Vec::new()), used_statics: RefCell::new(Vec::new()), - lltypes: RefCell::new(FxHashMap()), - scalar_lltypes: RefCell::new(FxHashMap()), - pointee_infos: RefCell::new(FxHashMap()), + lltypes: RefCell::new(FxHashMap::default()), + scalar_lltypes: RefCell::new(FxHashMap::default()), + pointee_infos: RefCell::new(FxHashMap::default()), isize_ty, dbg_cx, eh_personality: Cell::new(None), eh_unwind_resume: Cell::new(None), rust_try_fn: Cell::new(None), - intrinsics: RefCell::new(FxHashMap()), + intrinsics: RefCell::new(FxHashMap::default()), local_gen_sym_counter: Cell::new(0), } } diff --git a/src/librustc_codegen_llvm/debuginfo/metadata.rs b/src/librustc_codegen_llvm/debuginfo/metadata.rs index f5e5287cd42..3c4e000854e 100644 --- a/src/librustc_codegen_llvm/debuginfo/metadata.rs +++ b/src/librustc_codegen_llvm/debuginfo/metadata.rs @@ -111,9 +111,9 @@ impl TypeMap<'ll, 'tcx> { pub fn new() -> Self { TypeMap { unique_id_interner: Interner::new(), - type_to_metadata: FxHashMap(), - unique_id_to_metadata: FxHashMap(), - type_to_unique_id: FxHashMap(), + type_to_metadata: FxHashMap::default(), + unique_id_to_metadata: FxHashMap::default(), + type_to_unique_id: FxHashMap::default(), } } diff --git a/src/librustc_codegen_llvm/debuginfo/mod.rs b/src/librustc_codegen_llvm/debuginfo/mod.rs index acb79d6f568..2cd44b2a6c4 100644 --- a/src/librustc_codegen_llvm/debuginfo/mod.rs +++ b/src/librustc_codegen_llvm/debuginfo/mod.rs @@ -100,11 +100,11 @@ impl<'a, 'tcx> CrateDebugContext<'a, 'tcx> { llcontext, llmod, builder, - created_files: RefCell::new(FxHashMap()), - created_enum_disr_types: RefCell::new(FxHashMap()), + created_files: RefCell::new(FxHashMap::default()), + created_enum_disr_types: RefCell::new(FxHashMap::default()), type_map: RefCell::new(TypeMap::new()), namespace_map: RefCell::new(DefIdMap()), - composite_types_completed: RefCell::new(FxHashSet()), + composite_types_completed: RefCell::new(FxHashSet::default()), } } } |
