File tree Expand file tree Collapse file tree 1 file changed +1
-28
lines changed
compiler/rustc_metadata/src/rmeta Expand file tree Collapse file tree 1 file changed +1
-28
lines changed Original file line number Diff line number Diff line change @@ -1649,34 +1649,7 @@ impl<'a> CrateMetadataRef<'a> {
16491649 old_name
16501650 && let Ok ( rest) = virtual_name. strip_prefix ( virtual_dir)
16511651 {
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) ;
16801653
16811654 debug ! (
16821655 "try_to_translate_virtual_to_real: `{}` -> `{}`" ,
You can’t perform that action at this time.
0 commit comments