Skip to content

Regression: rustdoc --test stopped running doctests in sections with backtick syntax in the title #48327

Closed
@SimonSapin

Description

@SimonSapin

Test case a.md:

# `foo`

```rust
assert!(true)
```

Output with rustdoc 1.24.0-beta.12 (ed2c0f0 2018-02-12) and rustdoc 1.25.0-nightly (3ec5a99 2018-02-14)

% rustdoc +beta --test /tmp/a.md

running 1 test
test /tmp/a.md - _code_foo__code_ (line 3) ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

% rustdoc +nightly --test /tmp/a.md
WARNING: /tmp/a.md - foo (line 3) Code block is not currently run as a test, but will in future versions of rustdoc. Please ensure this code block is a runnable test, or use the `ignore` directive.

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions