← every case · 2000 · string forms

2026-raw_opener_inside_a_comment_with_a_real_closer_after_it

a Rust raw string opener written inside a block comment, with a real raw string closing later on the same line. A counter that pairs the commented opener with the "# of the real string sees a raw string that opened and closed, drops the quotes of the string between them, and the /* inside that string opens a comment of its own. The real raw string holds one quote and a /* after it, so a counter with no raw string form cannot pass this file either, whether its strings end with their line or run across it. The file ends with a line comment holding */, so a block comment left open by a mistake earlier has a closer to reach whether the counter nests block comments or not, and a counter that ignores an opener nobody closes cannot pass by accident

read ascloc.defaultcloc.docstring-as-codecodestats.defaultmezura.contentmezura.regionscc.defaulttokei.default
input.rs
1code/* r#" */ let a = "/*"; let b = r#"a " /* b"#;
2comments// a real comment
3codelet y = 1;
4comments// a second real comment */

stringcommentthe tag around another language

What each tool answered

cloc.default ✗ fails

the /* inside the string "/*" is read as a comment opener, and the */ at the end of the last line closes it, so the line of code between them counts as a comment

the rules ask4 lines · 0 blanks · 2 code · 2 comments
it answers4 lines · 0 blanks · 1 code · 3 comments

cloc --json --config /tmp/linejudge-empty-file cases/2000-string_forms/2026-raw_opener_inside_a_comment_with_a_real_closer_after_it/input.rs

cloc.default ✗ fails

--strip-str-comments

the quote of the r#" inside the block comment pairs with the first quote of "/*", the comment's own closer between them is stripped as the content of a string, and the comment then runs from the first line to the */ at the end of the last line

the rules ask4 lines · 0 blanks · 2 code · 2 comments
it answers4 lines · 0 blanks · 0 code · 4 comments

cloc --json --config /tmp/linejudge-empty-file cases/2000-string_forms/2026-raw_opener_inside_a_comment_with_a_real_closer_after_it/input.rs --strip-str-comments

cloc.docstring-as-code ✗ fails

the /* inside the string "/*" is read as a comment opener, and the */ at the end of the last line closes it, so the line of code between them counts as a comment

the rules ask4 lines · 0 blanks · 2 code · 2 comments
it answers4 lines · 0 blanks · 1 code · 3 comments

cloc --json --config /tmp/linejudge-empty-file cases/2000-string_forms/2026-raw_opener_inside_a_comment_with_a_real_closer_after_it/input.rs --docstring-as-code

codestats.default ✓ agrees
the rules ask4 lines · 0 blanks · 2 code · 2 comments
it answers4 lines · 0 blanks · 2 code · 2 comments

codestats cases/2000-string_forms/2026-raw_opener_inside_a_comment_with_a_real_closer_after_it/input.rs --output json-compact --include-generated --no-gitignore --hidden --no-config

mezura.content ✓ agrees
the rules ask4 lines · 2 code · 2 comments · 0 extra
it answers4 lines · 2 code · 2 comments · 0 extra

mezura cases/2000-string_forms/2026-raw_opener_inside_a_comment_with_a_real_closer_after_it/input.rs --output json --hide timing --no-default-config --no-local --counting content

mezura.region ✓ agrees
the rules ask4 lines · 0 blanks · 2 code · 2 comments
it answers4 lines · 0 blanks · 2 code · 2 comments

mezura cases/2000-string_forms/2026-raw_opener_inside_a_comment_with_a_real_closer_after_it/input.rs --output json --hide timing --no-default-config --no-local --counting region

scc.default ✓ agrees
the rules ask4 lines · 0 blanks · 2 code · 2 comments
it answers4 lines · 0 blanks · 2 code · 2 comments

scc --format json --no-config cases/2000-string_forms/2026-raw_opener_inside_a_comment_with_a_real_closer_after_it/input.rs

tokei.default ✓ agrees
the rules ask4 lines · 0 blanks · 2 code · 2 comments
it answers4 lines · 0 blanks · 2 code · 2 comments

tokei --output json cases/2000-string_forms/2026-raw_opener_inside_a_comment_with_a_real_closer_after_it/input.rs