Skip to content

Commit 9f02251

Browse files
committed
postprocess: improve logging of skipped and transformed functions
1 parent be49d4b commit 9f02251

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

c2rust-postprocess/postprocess/transforms/comments.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,7 @@ def apply_ident(
8888
if rust_comments:
8989
logging.info(
9090
f"Skipping Rust fn {identifier} with existing comments:\
91-
\n{rust_comments} in\
92-
\n{rust_definition}"
91+
\n{get_highlighted_rust(rust_definition)}"
9392
)
9493
return
9594

@@ -192,9 +191,12 @@ def apply_ident(
192191
rust_comments = get_rust_comments(rust_fn)
193192
logging.debug(f"{rust_comments=}")
194193

195-
assert c_comments == rust_comments
194+
logging.info(
195+
f"Comments transferred to Rust fn {identifier}:\
196+
\n{get_highlighted_rust(rust_fn)}"
197+
)
196198

197-
print(get_highlighted_rust(rust_fn))
199+
assert c_comments == rust_comments
198200

199201
# TODO: move this to apply_file?
200202
# the challenge is that not all transforms will update Rust code

0 commit comments

Comments
 (0)