Skip to content

Commit 7b8c8ff

Browse files
authored
Merge pull request #575 from ratmice/multi_line_warnings
Fix multi line cargo warnings
2 parents 75dd5b8 + 649a0f6 commit 7b8c8ff

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lrpar/src/lib/ctbuilder.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -618,8 +618,9 @@ where
618618
let ws = indent(" ", &yacc_diag.format_warning(w).to_string());
619619
// Assume if this variable is set we are running under cargo.
620620
if std::env::var("OUT_DIR").is_ok() && self.show_warnings {
621-
println!("cargo:warning={}", ws_loc);
622-
println!("cargo:warning={}", ws);
621+
for line in ws_loc.lines().chain(ws.lines()) {
622+
println!("cargo:warning={}", line);
623+
}
623624
} else if self.show_warnings {
624625
eprintln!("{}", ws_loc);
625626
eprintln!("{WARNING} {}", ws);

0 commit comments

Comments
 (0)