read_file: inline block comments misclassified
Resolved 💬 1 comment Opened Jan 24, 2026 by AmirTlinov Closed Feb 17, 2026
Summary
read_file comment header detection mishandles inline block comments:
let x = 1; /* startdoes not enter block-comment state, so following* ...lines are not treated as header comments./* comment */ let x = 1;is treated as a header comment even though it has trailing code.
Repro
- Create a file with:
let x = 1; /* start
* header line
*/
fn main() {}
- Call
read_filein indentation mode withinclude_header=trueanchored underfn main().
Expected
- Inline
/*starts block-comment state for subsequent lines, but the line itself is not a header. - Single-line
/* ... */with trailing code is not a header comment.
Actual
- Inline
/*does not start block-comment state, so header lines are missed. /* ... */ codeis treated as header.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗