Auto merge of #91957 - nnethercote:rm-SymbolStr, r=oli-obk
Remove `SymbolStr` This was originally proposed in https://github.com/rust-lang/rust/pull/74554#discussion_r466203544. As well as removing the icky `SymbolStr` type, it allows the removal of a lot of `&` and `*` occurrences. Best reviewed one commit at a time. r? `@oli-obk`
This commit is contained in:
commit
a41a6925ba
140 changed files with 354 additions and 415 deletions
|
@ -324,7 +324,7 @@ pub fn configure_and_expand(
|
|||
let crate_attrs = krate.attrs.clone();
|
||||
let extern_mod_loaded = |ident: Ident, attrs, items, span| {
|
||||
let krate = ast::Crate { attrs, items, span, is_placeholder: None };
|
||||
pre_expansion_lint(sess, lint_store, &krate, &crate_attrs, &ident.name.as_str());
|
||||
pre_expansion_lint(sess, lint_store, &krate, &crate_attrs, ident.name.as_str());
|
||||
(krate.attrs, krate.items)
|
||||
};
|
||||
let mut ecx = ExtCtxt::new(sess, cfg, resolver, Some(&extern_mod_loaded));
|
||||
|
@ -631,7 +631,7 @@ fn write_out_deps(
|
|||
// (e.g. accessed in proc macros).
|
||||
let file_depinfo = sess.parse_sess.file_depinfo.borrow();
|
||||
let extra_tracked_files = file_depinfo.iter().map(|path_sym| {
|
||||
let path = PathBuf::from(&*path_sym.as_str());
|
||||
let path = PathBuf::from(path_sym.as_str());
|
||||
let file = FileName::from(path);
|
||||
escape_dep_filename(&file.prefer_local().to_string())
|
||||
});
|
||||
|
@ -1049,8 +1049,8 @@ fn encode_and_write_metadata(
|
|||
|
||||
let need_metadata_file = tcx.sess.opts.output_types.contains_key(&OutputType::Metadata);
|
||||
if need_metadata_file {
|
||||
let crate_name = &tcx.crate_name(LOCAL_CRATE).as_str();
|
||||
let out_filename = filename_for_metadata(tcx.sess, crate_name, outputs);
|
||||
let crate_name = tcx.crate_name(LOCAL_CRATE);
|
||||
let out_filename = filename_for_metadata(tcx.sess, crate_name.as_str(), outputs);
|
||||
// To avoid races with another rustc process scanning the output directory,
|
||||
// we need to write the file somewhere else and atomically move it to its
|
||||
// final destination, with an `fs::rename` call. In order for the rename to
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue