]> git.lizzy.rs Git - rust.git/commit
Auto merge of #95697 - klensy:no-strings, r=petrochenkov
authorbors <bors@rust-lang.org>
Sat, 9 Apr 2022 13:15:26 +0000 (13:15 +0000)
committerbors <bors@rust-lang.org>
Sat, 9 Apr 2022 13:15:26 +0000 (13:15 +0000)
commit8c1fb2eb23964b56bd279b12aa925935d8559870
tree9c485d0dc837149ab9d1540da369cf3f2070a9c3
parentfbdb10f9fabe47eb763cb4b52b5721740cc63783
parentd0cc98689e3db7841c54c0ad1104dea87f811ff5
Auto merge of #95697 - klensy:no-strings, r=petrochenkov

refactor: simplify few string related interactions

Few small optimizations:

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.
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 FxHashSet<Symbol> instead of BTreeSet<String>
CrateInfo.crate_name replace FxHashMap<CrateNum, String> with FxHashMap<CrateNum, Symbol>
compiler/rustc_builtin_macros/src/source_util.rs
compiler/rustc_expand/src/base.rs