← every case · 2000 · string forms
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
| 1 | codecodecodecodecodecodecode | /* r#" */ let a = "/*"; let b = r#"a " /* b"#; |
| 2 | commentscommentscommentscommentscommentscommentscomments | // a real comment |
| 3 | codecodecodecodecodecodecode | let y = 1; |
| 4 | commentscommentscommentscommentscommentscommentscomments | // a second real comment */ |
stringcommentthe tag around another language
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
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
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
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
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
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 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 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 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 --format json --no-config cases/2000-string_forms/2026-raw_opener_inside_a_comment_with_a_real_closer_after_it/input.rs
tokei --output json cases/2000-string_forms/2026-raw_opener_inside_a_comment_with_a_real_closer_after_it/input.rs