@@ -214,15 +214,6 @@ pub struct Session {
214214 /// drown everything else in noise.
215215 miri_unleashed_features : Lock < Vec < ( Span , Option < Symbol > ) > > ,
216216
217- /// Base directory containing the `src/` for the Rust standard library, and
218- /// potentially `rustc` as well, if we can can find it. Right now it's always
219- /// `$sysroot/lib/rustlib/src/rust` (i.e. the `rustup` `rust-src` component).
220- ///
221- /// This directory is what the virtual `/rustc/$hash` is translated back to,
222- /// if Rust was built with path remapping to `/rustc/$hash` enabled
223- /// (the `rust.remap-debuginfo` option in `config.toml`).
224- pub real_rust_source_base_dir : Option < PathBuf > ,
225-
226217 /// Architecture to use for interpreting asm!.
227218 pub asm_arch : Option < InlineAsmArch > ,
228219
@@ -1390,26 +1381,6 @@ pub fn build_session(
13901381 _ => CtfeBacktrace :: Disabled ,
13911382 } ) ;
13921383
1393- // Try to find a directory containing the Rust `src`, for more details see
1394- // the doc comment on the `real_rust_source_base_dir` field.
1395- let real_rust_source_base_dir = {
1396- // This is the location used by the `rust-src` `rustup` component.
1397- let mut candidate = sysroot. join ( "lib/rustlib/src/rust" ) ;
1398- if let Ok ( metadata) = candidate. symlink_metadata ( ) {
1399- // Replace the symlink rustbuild creates, with its destination.
1400- // We could try to use `fs::canonicalize` instead, but that might
1401- // produce unnecessarily verbose path.
1402- if metadata. file_type ( ) . is_symlink ( ) {
1403- if let Ok ( symlink_dest) = std:: fs:: read_link ( & candidate) {
1404- candidate = symlink_dest;
1405- }
1406- }
1407- }
1408-
1409- // Only use this directory if it has a file we can expect to always find.
1410- if candidate. join ( "library/std/src/lib.rs" ) . is_file ( ) { Some ( candidate) } else { None }
1411- } ;
1412-
14131384 let asm_arch =
14141385 if target_cfg. allow_asm { InlineAsmArch :: from_str ( & target_cfg. arch ) . ok ( ) } else { None } ;
14151386
@@ -1453,7 +1424,6 @@ pub fn build_session(
14531424 system_library_path : OneThread :: new ( RefCell :: new ( Default :: default ( ) ) ) ,
14541425 ctfe_backtrace,
14551426 miri_unleashed_features : Lock :: new ( Default :: default ( ) ) ,
1456- real_rust_source_base_dir,
14571427 asm_arch,
14581428 target_features : FxHashSet :: default ( ) ,
14591429 known_attrs : Lock :: new ( MarkedAttrs :: new ( ) ) ,
0 commit comments