This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +14
-5
lines changed
src/tools/miri/cargo-miri/src Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change 22
33use std:: env;
44use std:: ffi:: OsStr ;
5+ use std:: fmt:: Write ;
56use std:: path:: PathBuf ;
67use std:: process:: { self , Command } ;
78
@@ -140,12 +141,20 @@ pub fn setup(
140141 // Do the build.
141142 if print_sysroot {
142143 // Be silent.
143- } else if only_setup {
144- // We want to be explicit.
145- eprintln ! ( "Preparing a sysroot for Miri (target: {target})..." ) ;
146144 } else {
147- // We want to be quiet, but still let the user know that something is happening.
148- eprint ! ( "Preparing a sysroot for Miri (target: {target})... " ) ;
145+ let mut msg = String :: new ( ) ;
146+ write ! ( msg, "Preparing a sysroot for Miri (target: {target})" ) . unwrap ( ) ;
147+ if verbose > 0 {
148+ write ! ( msg, " in {}" , sysroot_dir. display( ) ) . unwrap ( ) ;
149+ }
150+ write ! ( msg, "..." ) . unwrap ( ) ;
151+ if only_setup {
152+ // We want to be explicit.
153+ eprintln ! ( "{msg}" ) ;
154+ } else {
155+ // We want to be quiet, but still let the user know that something is happening.
156+ eprint ! ( "{msg} " ) ;
157+ }
149158 }
150159 SysrootBuilder :: new ( & sysroot_dir, target)
151160 . build_mode ( BuildMode :: Check )
You can’t perform that action at this time.
0 commit comments