Skip to content

Commit 5f5483a

Browse files
committed
postprocess: tell the model to keep /// out of function bodies
1 parent 3a73bf4 commit 5f5483a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

c2rust-postprocess/postprocess/transforms/comments.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,8 @@ def apply_ident(
132132
Transfer exactly the comment lines listed below, in order; do not transfer any other
133133
comments in the C function (they may come from inactive preprocessor regions) and do
134134
not add new ones.
135-
Use Rust doc comment syntax (///) where appropriate (e.g., for function documentation).
135+
Use Rust doc comment syntax (///) only for comments placed before the function signature;
136+
inside the function body use plain // comments (/// before a statement does not compile).
136137
Respond with the Rust function definition with the transferred comments; say nothing else.
137138
""" # noqa: E501
138139
prompt_text = dedent(prompt_text).strip()

0 commit comments

Comments
 (0)