Skip to content

Commit a7adb0b

Browse files
authored
Print Rustc unparsed messages in cargo kani (rust-lang#2193)
In some cases, like `-Zunpretty=expanded`, Rustc will print information to the stdout that is not in json format. For those cases, we should print the message as is.
1 parent 68b85d6 commit a7adb0b

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

kani-driver/src/call_cargo.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,18 @@ impl KaniSession {
202202
| Message::BuildFinished(_) => {
203203
// do nothing
204204
}
205+
Message::TextLine(msg) => {
206+
if !self.args.quiet {
207+
println!("{msg}");
208+
}
209+
}
210+
205211
// Non-exhaustive enum.
206-
_ => {}
212+
_ => {
213+
if !self.args.quiet {
214+
println!("{message:?}");
215+
}
216+
}
207217
}
208218
}
209219
let status = cargo_process.wait()?;

0 commit comments

Comments
 (0)