File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -142,17 +142,15 @@ fn get_sysroot() -> PathBuf {
142142
143143fn get_host ( ) -> String {
144144 let rustc = rustc_test_suite ( ) . unwrap_or ( PathBuf :: from ( "rustc" ) ) ;
145- let host = std:: process:: Command :: new ( rustc)
145+ let rustc_version = std:: process:: Command :: new ( rustc)
146146 . arg ( "-vV" )
147147 . output ( )
148148 . expect ( "rustc not found for -vV" )
149149 . stdout ;
150- let host = std:: str:: from_utf8 ( & host) . expect ( "sysroot is not utf8" ) ;
151- let host = host. split ( "\n host: " ) . nth ( 1 ) . expect (
152- "no host: part in rustc -vV" ,
153- ) ;
154- let host = host. split ( '\n' ) . next ( ) . expect ( "no \n after host" ) ;
155- String :: from ( host)
150+ let rustc_version = std:: str:: from_utf8 ( & rustc_version) . expect ( "rustc -vV is not utf8" ) ;
151+ let version_meta = rustc_version:: version_meta_for ( & rustc_version)
152+ . expect ( "failed to parse rustc version info" ) ;
153+ version_meta. host
156154}
157155
158156fn run_pass_miri ( opt : bool ) {
You can’t perform that action at this time.
0 commit comments