File tree 1 file changed +5
-7
lines changed
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 {
142
142
143
143
fn get_host ( ) -> String {
144
144
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)
146
146
. arg ( "-vV" )
147
147
. output ( )
148
148
. expect ( "rustc not found for -vV" )
149
149
. 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 ( "host 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
156
154
}
157
155
158
156
fn run_pass_miri ( opt : bool ) {
You can’t perform that action at this time.
0 commit comments