@@ -214,15 +214,6 @@ pub struct Session {
214
214
/// drown everything else in noise.
215
215
miri_unleashed_features : Lock < Vec < ( Span , Option < Symbol > ) > > ,
216
216
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
-
226
217
/// Architecture to use for interpreting asm!.
227
218
pub asm_arch : Option < InlineAsmArch > ,
228
219
@@ -1390,26 +1381,6 @@ pub fn build_session(
1390
1381
_ => CtfeBacktrace :: Disabled ,
1391
1382
} ) ;
1392
1383
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
-
1413
1384
let asm_arch =
1414
1385
if target_cfg. allow_asm { InlineAsmArch :: from_str ( & target_cfg. arch ) . ok ( ) } else { None } ;
1415
1386
@@ -1453,7 +1424,6 @@ pub fn build_session(
1453
1424
system_library_path : OneThread :: new ( RefCell :: new ( Default :: default ( ) ) ) ,
1454
1425
ctfe_backtrace,
1455
1426
miri_unleashed_features : Lock :: new ( Default :: default ( ) ) ,
1456
- real_rust_source_base_dir,
1457
1427
asm_arch,
1458
1428
target_features : FxHashSet :: default ( ) ,
1459
1429
known_attrs : Lock :: new ( MarkedAttrs :: new ( ) ) ,
0 commit comments