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>
This commit is contained in:
@@ -696,7 +696,7 @@ impl<'tcx> Visitor<'tcx> for Checker<'tcx> {
|
||||
hir::ItemKind::ExternCrate(_) => {
|
||||
// compiler-generated `extern crate` items have a dummy span.
|
||||
// `std` is still checked for the `restricted-std` feature.
|
||||
if item.span.is_dummy() && item.ident.as_str() != "std" {
|
||||
if item.span.is_dummy() && item.ident.name != sym::std {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user