Decrease the indentation in imported_source_file
This commit is contained in:
parent
39cf520299
commit
919b391315
@ -1467,19 +1467,16 @@ fn filter<'a>(sess: &Session, path: Option<&'a Path>) -> Option<&'a Path> {
|
|||||||
// `try_to_translate_virtual_to_real` don't have to worry about how the
|
// `try_to_translate_virtual_to_real` don't have to worry about how the
|
||||||
// compiler is bootstrapped.
|
// compiler is bootstrapped.
|
||||||
if let Some(virtual_dir) = &sess.opts.unstable_opts.simulate_remapped_rust_src_base
|
if let Some(virtual_dir) = &sess.opts.unstable_opts.simulate_remapped_rust_src_base
|
||||||
{
|
&& let Some(real_dir) = &sess.opts.real_rust_source_base_dir
|
||||||
if let Some(real_dir) = &sess.opts.real_rust_source_base_dir {
|
&& let rustc_span::FileName::Real(ref mut old_name) = name
|
||||||
|
&& let rustc_span::RealFileName::LocalPath(local) = old_name {
|
||||||
for subdir in ["library", "compiler"] {
|
for subdir in ["library", "compiler"] {
|
||||||
if let rustc_span::FileName::Real(ref mut old_name) = name {
|
|
||||||
if let rustc_span::RealFileName::LocalPath(local) = old_name {
|
|
||||||
if let Ok(rest) = local.strip_prefix(real_dir.join(subdir)) {
|
if let Ok(rest) = local.strip_prefix(real_dir.join(subdir)) {
|
||||||
*old_name = rustc_span::RealFileName::Remapped {
|
*old_name = rustc_span::RealFileName::Remapped {
|
||||||
local_path: None,
|
local_path: None,
|
||||||
virtual_name: virtual_dir.join(subdir).join(rest),
|
virtual_name: virtual_dir.join(subdir).join(rest),
|
||||||
};
|
};
|
||||||
}
|
break;
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user