<code>```should_panic</code>, <code>```should_fail</code>, and <code>```rust,should_fail</code> all work fine. Test case: Run rustdoc as `rustdoc --test test.rs`, where test.rs contains `````` rust #![crate_type = "bin"] #![crate_name = "shouldpanic"] /// Example of rustdoc incorrectly parsing <code>```rust,should_panic</code>. /// /// ```should_panic /// fn main() { panic!("fee"); } /// ``` /// /// ```should_fail /// fn main() { panic!("fi"); } /// ``` /// /// ```rust,should_fail /// fn main() { panic!("fo"); } /// ``` /// /// ```rust,should_panic /// fn main() { panic!("fum"); } /// ``` fn main() { // We're actually just fine, thank you. :) } ``````