Skip to content

Doc tests not run with cargo test TESTNAME on stable (1.35.0) #6981

@tspiteri

Description

@tspiteri

The contents of doc/src/lib.rs:

/// ```rust
/// let _ = {};
/// ```
pub fn foo() {}

Running cargo test foo, doc tests matching the pattern are not run for stable 1.35.0, but they run fine with 1.34.2.

$ cargo version
cargo 1.35.0 (6f3e9c367 2019-04-04)
$ cargo test foo
    Finished dev [unoptimized + debuginfo] target(s) in 0.15s
     Running target/debug/deps/doc-86434eb559164ed5

running 0 tests

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

$ cargo +1.34.2 test foo
    Finished dev [unoptimized + debuginfo] target(s) in 0.16s
     Running target/debug/deps/doc-f8e8caa996ffb988

running 0 tests

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

   Doc-tests doc

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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-doctestsArea: rustdoc --testA-documenting-cargo-itselfArea: Cargo's documentationC-bugCategory: bugCommand-testE-hardExperience: HardS-needs-designStatus: Needs someone to work further on the design for the feature or fix. NOT YET accepted.

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions