← every case · 2000 · string forms
a Rust raw string opener written inside a block comment. Its closing symbol is "#, so a counter that pairs it with the next quote it meets loses the real string later on the same line, and the /* inside that string then opens a comment of its own. The raw string on the line below 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#" opens a raw string */ let s = "/*"; |
| 2 | codecodecodecodecodecodecode | let text = r#"the " /* character"#; |
| 3 | codecodecodecodecodecodecode | let y = 1; |
| 4 | commentscommentscommentscommentscommentscommentscomments | // a real comment |
| 5 | commentscommentscommentscommentscommentscommentscomments | // a second real comment |
| 6 | commentscommentscommentscommentscommentscommentscomments | // a third 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 two lines of code between them count as comments
cloc --json --config /tmp/linejudge-empty-file cases/2000-string_forms/2025-raw_opener_inside_a_comment/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/2025-raw_opener_inside_a_comment/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 two lines of code between them count as comments
cloc --json --config /tmp/linejudge-empty-file cases/2000-string_forms/2025-raw_opener_inside_a_comment/input.rs --docstring-as-code
codestats cases/2000-string_forms/2025-raw_opener_inside_a_comment/input.rs --output json-compact --include-generated --no-gitignore --hidden --no-config
mezura cases/2000-string_forms/2025-raw_opener_inside_a_comment/input.rs --output json --hide timing --no-default-config --no-local --counting content
mezura cases/2000-string_forms/2025-raw_opener_inside_a_comment/input.rs --output json --hide timing --no-default-config --no-local --counting region
scc --format json --no-config cases/2000-string_forms/2025-raw_opener_inside_a_comment/input.rs
tokei --output json cases/2000-string_forms/2025-raw_opener_inside_a_comment/input.rs