Rollup merge of #122588 - klensy:imported_source_file, r=michaelwoerister
less useless filter calls in imported_source_file This reduces calls to `filter` greatly, giving 0.3% instructions win on some tests.
This commit is contained in:
commit
acc45ebf72
1 changed files with 10 additions and 10 deletions
|
@ -1590,6 +1590,7 @@ impl<'a, 'tcx> CrateMetadataRef<'a> {
|
|||
})
|
||||
}
|
||||
|
||||
let try_to_translate_virtual_to_real = |name: &mut rustc_span::FileName| {
|
||||
// Translate the virtual `/rustc/$hash` prefix back to a real directory
|
||||
// that should hold actual sources, where possible.
|
||||
//
|
||||
|
@ -1600,7 +1601,6 @@ impl<'a, 'tcx> CrateMetadataRef<'a> {
|
|||
filter(sess, sess.opts.unstable_opts.simulate_remapped_rust_src_base.as_deref()),
|
||||
];
|
||||
|
||||
let try_to_translate_virtual_to_real = |name: &mut rustc_span::FileName| {
|
||||
debug!(
|
||||
"try_to_translate_virtual_to_real(name={:?}): \
|
||||
virtual_rust_source_base_dir={:?}, real_rust_source_base_dir={:?}",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue