File tree Expand file tree Collapse file tree 2 files changed +2
-29
lines changed
compiler/rustc_metadata/src/rmeta
tests/codegen/remap_path_prefix Expand file tree Collapse file tree 2 files changed +2
-29
lines changed Original file line number Diff line number Diff line change @@ -1649,34 +1649,7 @@ impl<'a> CrateMetadataRef<'a> {
1649
1649
old_name
1650
1650
&& let Ok ( rest) = virtual_name. strip_prefix ( virtual_dir)
1651
1651
{
1652
- // The std library crates are in
1653
- // `$sysroot/lib/rustlib/src/rust/library`, whereas other crates
1654
- // may be in `$sysroot/lib/rustlib/src/rust/` directly. So we
1655
- // detect crates from the std libs and handle them specially.
1656
- const STD_LIBS : & [ & str ] = & [
1657
- "core" ,
1658
- "alloc" ,
1659
- "std" ,
1660
- "test" ,
1661
- "term" ,
1662
- "unwind" ,
1663
- "proc_macro" ,
1664
- "panic_abort" ,
1665
- "panic_unwind" ,
1666
- "profiler_builtins" ,
1667
- "rtstartup" ,
1668
- "rustc-std-workspace-core" ,
1669
- "rustc-std-workspace-alloc" ,
1670
- "rustc-std-workspace-std" ,
1671
- "backtrace" ,
1672
- ] ;
1673
- let is_std_lib = STD_LIBS . iter ( ) . any ( |l| rest. starts_with ( l) ) ;
1674
-
1675
- let new_path = if is_std_lib {
1676
- real_dir. join ( "library" ) . join ( rest)
1677
- } else {
1678
- real_dir. join ( rest)
1679
- } ;
1652
+ let new_path = real_dir. join ( rest) ;
1680
1653
1681
1654
debug ! (
1682
1655
"try_to_translate_virtual_to_real: `{}` -> `{}`" ,
Original file line number Diff line number Diff line change 7
7
// true automatically. If paths to std library hasn't been remapped, we use the
8
8
// above simulate-remapped-rust-src-base option to do it temporarily
9
9
10
- // CHECK: !DIFile(filename: "{{/rustc/.* /library/std/src/panic.rs}}"
10
+ // CHECK: !DIFile(filename: "{{/rustc/xyz /library/std/src/panic.rs}}"
11
11
fn main ( ) {
12
12
std:: thread:: spawn ( || {
13
13
println ! ( "hello" ) ;
You can’t perform that action at this time.
0 commit comments