@@ -12,11 +12,13 @@ pub use os_impl::*;
1212mod os_impl {
1313 use std:: path:: Path ;
1414
15+ use crate :: diagnostics:: DiagCtx ;
16+
1517 pub fn check_filesystem_support ( _sources : & [ & Path ] , _output : & Path ) -> bool {
1618 return false ;
1719 }
1820
19- pub fn check ( _path : & Path , _bad : & mut bool ) { }
21+ pub fn check ( _path : & Path , _diag_ctx : DiagCtx ) { }
2022}
2123
2224#[ cfg( unix) ]
@@ -36,6 +38,8 @@ mod os_impl {
3638
3739 use FilesystemSupport :: * ;
3840
41+ use crate :: diagnostics:: DiagCtx ;
42+
3943 fn is_executable ( path : & Path ) -> std:: io:: Result < bool > {
4044 Ok ( path. metadata ( ) ?. mode ( ) & 0o111 != 0 )
4145 }
@@ -106,14 +110,16 @@ mod os_impl {
106110 }
107111
108112 #[ cfg( unix) ]
109- pub fn check ( path : & Path , bad : & mut bool ) {
113+ pub fn check ( path : & Path , diag_ctx : DiagCtx ) {
114+ let mut check = diag_ctx. start_check ( "bins" ) ;
115+
110116 use std:: ffi:: OsStr ;
111117
112118 const ALLOWED : & [ & str ] = & [ "configure" , "x" ] ;
113119
114120 for p in RI_EXCLUSION_LIST {
115121 if !path. join ( Path :: new ( p) ) . exists ( ) {
116- tidy_error ! ( bad , "rust-installer test bins missed: {p}" ) ;
122+ check . error ( format ! ( "rust-installer test bins missed: {p}" ) ) ;
117123 }
118124 }
119125
@@ -153,7 +159,7 @@ mod os_impl {
153159 } ) ;
154160 let path_bytes = rel_path. as_os_str ( ) . as_bytes ( ) ;
155161 if output. status . success ( ) && output. stdout . starts_with ( path_bytes) {
156- tidy_error ! ( bad , "binary checked into source: {}" , file. display( ) ) ;
162+ check . error ( format ! ( "binary checked into source: {}" , file. display( ) ) ) ;
157163 }
158164 }
159165 } ,
0 commit comments