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> {
451451 if let Ok ( output) = cmd. output ( ) {
452452 if let Ok ( s) = String :: from_utf8 ( output. stdout ) {
453453 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- }
458454 // See if the toolchain is sufficiently new, after the libstd
459455 // has been internally reorganized
460456 let srcpath = sysroot. join ( "lib/rustlib/src/rust/library" ) ;
461457 if srcpath. exists ( ) {
462458 return Some ( srcpath) ;
463459 }
460+ let srcpath = sysroot. join ( "lib/rustlib/src/rust/src" ) ;
461+ if srcpath. exists ( ) {
462+ return Some ( srcpath) ;
463+ }
464464 }
465465 }
466466 None
@@ -545,7 +545,6 @@ fn validate_rust_src_path(path: path::PathBuf) -> Result<path::PathBuf, RustSrcP
545545 if path. join ( "libstd" ) . exists ( ) || path. join ( "std" ) . join ( "src" ) . exists ( ) {
546546 Ok ( path)
547547 } else {
548-
549548 Err ( RustSrcPathError :: NotRustSourceTree ( path. join ( "libstd" ) ) )
550549 }
551550}
You can’t perform that action at this time.
0 commit comments