Description
I tried this code:
/*!
* ```
* let thing = "**/*.css";
* ```
*/
/// ```
/// let thing = "**/*.css";
/// ```
pub fn get_thing() -> &'static str {
let thing = "**/*.css";
thing
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn it_works() {
let result = get_thing();
assert_eq!(result, "**/*.css");
}
}
I expected to see this happen: The docs to compile.
Instead, this happened:
The docs fail to compile with this message:
error: prefix
css
is unknown
--> src/lib.rs:3:22
|
3 | * let thing = "/*.css";
| ^^^ unknown prefix
|
= note: prefixed identifiers and literals are reserved since Rust 2021
help: consider inserting whitespace here
|
3 | * let thing = "/*.css ";
| +error: prefix
css
is unknown
--> src/lib.rs:11:23
|
11 | let thing = "/*.css";
| ^^^ unknown prefix
|
= note: prefixed identifiers and literals are reserved since Rust 2021
help: consider inserting whitespace here
|
11 | let thing = "/*.css ";
| +error[E0758]: unterminated block comment
--> src/lib.rs:23:31
|
23 | assert_eq!(result, "**/*.css");
| _______________________________^
24 | | }
25 | | }
| |__^For more information about this error, try
rustc --explain E0758
.
error: could not documentrustdoc_issue
Meta
rustc --version --verbose
:
rustc 1.80.0 (051478957 2024-07-21)
binary: rustc
commit-hash: 051478957371ee0084a7c0913941d2a8c4757bb9
commit-date: 2024-07-21
host: x86_64-unknown-linux-gnu
release: 1.80.0
LLVM version: 18.1.7
I've also reproduced on nightly.