Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
cjsut opened this issue Mar 26, 2015 · 2 comments
Closed

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

cjsut opened this issue Mar 26, 2015 · 2 comments
Assignees
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@cjsut
Copy link
Contributor

cjsut commented Mar 26, 2015

```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. :)
}
@cjsut cjsut 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 Mar 26, 2015
@steveklabnik steveklabnik added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Mar 27, 2015
@emberian emberian self-assigned this Mar 30, 2015
@alexcrichton
Copy link
Member

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

@alexcrichton alexcrichton assigned alexcrichton and unassigned emberian Apr 8, 2015
alexcrichton added a commit to alexcrichton/rust that referenced this issue Apr 8, 2015
@cjsut
Copy link
Contributor Author

cjsut commented Apr 8, 2015

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

@cjsut cjsut closed this as completed Apr 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants