File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -451,16 +451,16 @@ fn check_rust_sysroot() -> Option<path::PathBuf> {
451
451
if let Ok ( output) = cmd. output ( ) {
452
452
if let Ok ( s) = String :: from_utf8 ( output. stdout ) {
453
453
let sysroot = path:: Path :: new ( s. trim ( ) ) ;
454
- let srcpath = sysroot. join ( "lib/rustlib/src/rust/src" ) ;
455
- if srcpath. exists ( ) {
456
- return Some ( srcpath) ;
457
- }
458
454
// See if the toolchain is sufficiently new, after the libstd
459
455
// has been internally reorganized
460
456
let srcpath = sysroot. join ( "lib/rustlib/src/rust/library" ) ;
461
457
if srcpath. exists ( ) {
462
458
return Some ( srcpath) ;
463
459
}
460
+ let srcpath = sysroot. join ( "lib/rustlib/src/rust/src" ) ;
461
+ if srcpath. exists ( ) {
462
+ return Some ( srcpath) ;
463
+ }
464
464
}
465
465
}
466
466
None
@@ -545,7 +545,6 @@ fn validate_rust_src_path(path: path::PathBuf) -> Result<path::PathBuf, RustSrcP
545
545
if path. join ( "libstd" ) . exists ( ) || path. join ( "std" ) . join ( "src" ) . exists ( ) {
546
546
Ok ( path)
547
547
} else {
548
-
549
548
Err ( RustSrcPathError :: NotRustSourceTree ( path. join ( "libstd" ) ) )
550
549
}
551
550
}
You can’t perform that action at this time.
0 commit comments