Skip to content

Commit

Permalink
check_doc_keyword: don't alloc string for emptiness check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
klensy committed Apr 8, 2022
1 parent 2efede7 commit f2d2ec3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/driver/jit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,8 @@ fn load_imported_symbols_for_jit(
match data[cnum.as_usize() - 1] {
Linkage::NotLinked | Linkage::IncludedFromDylib => {}
Linkage::Static => {
let name = &crate_info.crate_name[&cnum];
let mut err = sess.struct_err(&format!("Can't load static lib {}", name.as_str()));
let name = crate_info.crate_name[&cnum];
let mut err = sess.struct_err(&format!("Can't load static lib {}", name));
err.note("rustc_codegen_cranelift can only load dylibs in JIT mode.");
err.emit();
}
Expand Down

0 comments on commit f2d2ec3

Please sign in to comment.