Skip to content

Commit

Permalink
analyze: use println! instead of info! to print rewritten code
Browse files Browse the repository at this point in the history
  • Loading branch information
spernsteiner committed Dec 10, 2024
1 parent 5979113 commit 8c054f7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions c2rust-analyze/src/rewrite/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -338,18 +338,18 @@ pub fn apply_rewrites(
update_files: UpdateFiles,
) {
let emit = |filename, src: String| {
info!("\n\n ===== BEGIN {:?} =====", filename);
println!("\n\n ===== BEGIN {:?} =====", filename);
for line in src.lines() {
// Omit filecheck directives from the debug output, as filecheck can get confused due
// to directives matching themselves (e.g. `// CHECK: foo` will match the `foo` in the
// line `// CHECK: foo`).
if let Some((pre, _post)) = line.split_once("// CHECK") {
info!("{}// (FileCheck directive omitted)", pre);
println!("{}// (FileCheck directive omitted)", pre);
} else {
info!("{}", line);
println!("{}", line);
}
}
info!(" ===== END {:?} =====", filename);
println!(" ===== END {:?} =====", filename);

if !matches!(update_files, UpdateFiles::No) {
let mut path_ok = false;
Expand Down

0 comments on commit 8c054f7

Please sign in to comment.