Skip to content

Rustdoc: should_panic not applied for ```rust,should_panic code blocks #23744

Closed

Description

@cjsut

```should_panic, ```should_fail, and ```rust,should_fail all work fine.

Test case: Run rustdoc as rustdoc --test test.rs, where test.rs contains

#![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. :)
}

Activity

  1. changed the title [-]Rustdoc: `should_panic` not applied for <code>```rust,should_panic</code> code blocks[/-] [+]Rustdoc: should_panic not applied for ```rust,should_panic code blocks[/+] on Mar 26, 2015
  2. added
    T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.
    on Mar 27, 2015
  3. self-assigned this
    on Mar 30, 2015
  4. alexcrichton commented on Apr 8, 2015

    @alexcrichton
    Member

    I believe I fixed this recently when removing should_fail, I'll add a test for this though.

  5. cjsut commented on Apr 8, 2015

    @cjsut
    ContributorAuthor

    Fixed in nightly (since some weeks ago, actually). Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions