Closed
Description
Code
I tried this code with cargo doc
:
/// This is a test:
/// ```ASN.1
/// foo
/// ```
fn main() {
println!("Hello, world!");
}
I expected to see this happen: rust doc generated without any warnings.
Instead, this happened:
warning: unexpected character `.`
--> src/main.rs:1:1
|
1 | / /// This is a test:
2 | | /// ```ASN.1
3 | | /// foo
4 | | /// ```
| |_______^
|
= note: `#[warn(rustdoc::invalid_codeblock_attributes)]` on by default
"ASN.1" is supported by Linguist. I also see the same result if I specify any codefence languages that include special characters (e.g. C++, C#).
Version it worked on
It most recently worked on: rustc 1.74.0-nightly (8142a319e 2023-09-13)
Version with regression
It fails with a warning on rustc 1.74.0-nightly (203c57dbe 2023-09-17)
rustc --version --verbose
:
rustc 1.74.0-nightly (203c57dbe 2023-09-17)
binary: rustc
commit-hash: 203c57dbe20aee67eaa8f7be45d1e4ef0b274109
commit-date: 2023-09-17
host: x86_64-unknown-linux-gnu
release: 1.74.0-nightly
LLVM version: 17.0.0
Possibly related to #110800 ?
@rustbot modify labels: +regression-from-stable-to-nightly -regression-untriaged