Skip to content

Commit f2d2ec3

Browse files
committed
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 rust-lang#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>
1 parent 2efede7 commit f2d2ec3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: src/driver/jit.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,8 @@ fn load_imported_symbols_for_jit(
288288
match data[cnum.as_usize() - 1] {
289289
Linkage::NotLinked | Linkage::IncludedFromDylib => {}
290290
Linkage::Static => {
291-
let name = &crate_info.crate_name[&cnum];
292-
let mut err = sess.struct_err(&format!("Can't load static lib {}", name.as_str()));
291+
let name = crate_info.crate_name[&cnum];
292+
let mut err = sess.struct_err(&format!("Can't load static lib {}", name));
293293
err.note("rustc_codegen_cranelift can only load dylibs in JIT mode.");
294294
err.emit();
295295
}

0 commit comments

Comments
 (0)