about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src/lib.rs
diff options
context:
space:
mode:
authorklensy <klensy@users.noreply.github.com>2022-04-05 15:52:53 +0300
committerklensy <klensy@users.noreply.github.com>2022-04-08 11:45:57 +0300
commitd0cc98689e3db7841c54c0ad1104dea87f811ff5 (patch)
tree9b577f2fe457711704db64063c5fd64d43b61850 /compiler/rustc_codegen_ssa/src/lib.rs
parentf262ca12aac76152c4b46cefcf8300f0249a5eb2 (diff)
downloadrust-d0cc98689e3db7841c54c0ad1104dea87f811ff5.tar.gz
rust-d0cc98689e3db7841c54c0ad1104dea87f811ff5.zip
check_doc_keyword: don't alloc string for emptiness check
check_doc_alias_value: get argument as Symbol to prevent needless string convertions

check_doc_attrs: don't alloc vec, iterate over slice. Vec introduced in #83149, but no perf run posted on merge

replace as_str() check with symbol check

get_single_str_from_tts: don't prealloc string

trivial string to str replace

LifetimeScopeForPath::NonElided use Vec<Symbol> instead of Vec<String>

AssertModuleSource use BTreeSet<Symbol> instead of BTreeSet<String>

CrateInfo.crate_name replace FxHashMap<CrateNum, String> with FxHashMap<CrateNum, Symbol>
Diffstat (limited to 'compiler/rustc_codegen_ssa/src/lib.rs')
-rw-r--r--compiler/rustc_codegen_ssa/src/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_ssa/src/lib.rs b/compiler/rustc_codegen_ssa/src/lib.rs
index a2d60472ed9..5273b6cc837 100644
--- a/compiler/rustc_codegen_ssa/src/lib.rs
+++ b/compiler/rustc_codegen_ssa/src/lib.rs
@@ -146,7 +146,7 @@ pub struct CrateInfo {
     pub profiler_runtime: Option<CrateNum>,
     pub is_no_builtins: FxHashSet<CrateNum>,
     pub native_libraries: FxHashMap<CrateNum, Vec<NativeLib>>,
-    pub crate_name: FxHashMap<CrateNum, String>,
+    pub crate_name: FxHashMap<CrateNum, Symbol>,
     pub used_libraries: Vec<NativeLib>,
     pub used_crate_source: FxHashMap<CrateNum, Lrc<CrateSource>>,
     pub used_crates: Vec<CrateNum>,