Skip to content

rustdoc ignore-* markdown attribute ignores everything #138863

@weihanglo

Description

@weihanglo

Run rustdoc --test lib.rs on aarch64, this doesn't seem to run doctest, while previously it did.

///```ignore-x86_64
///assert!(cfg!(not(target_arch = "x86_64")));
///```
pub fn foo() -> u8 {
    4
}

Steps

$ rustdoc +nightly-2025-03-23 --test lib.rs

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
$ rustdoc +nightly-2025-03-22 --test lib.rs

running 1 test
test lib.rs - foo (line 2) ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 1.08s

Meta

  • Bad version rustdoc 1.87.0-nightly (b48576b4d 2025-03-22)
  • Good version rustdoc 1.87.0-nightly (be73c1f46 2025-03-21)

Possibly caused by #138535.

See also rust-lang/cargo#15193 (comment).

Metadata

Metadata

Assignees

Labels

A-doctestsArea: Documentation tests, run by rustdocC-bugCategory: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.

Type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions