Skip to content

[Hoedown comeback regression] Code in doc not tested with future warning, when it was always a test in the past #41401

Closed
@kennytm

Description

@kennytm

Test case:

// src/lib.rs

/// ```
/// assert!(true);
/// ```
///
/// ```
/// assert!(true);
/// ```
pub fn test() {}

Expected: when running cargo test, it will run two doctests (as in stable and beta).

running 2 tests
test src/lib.rs - test (line 1) ... ok
test src/lib.rs - test (line 5) ... ok

Actual: Only the first doctest is run, the second one is skipped, with this warning:

WARNING: src/lib.rs - test (line 5) 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 1 test
test src/lib.rs - test (line 1) ... ok

Real life test case:

(cc @GuillaumeGomez #41290)


No warnings in this version:

rustdoc 1.18.0-nightly (28a742997 2017-04-13)
binary: rustdoc
commit-hash: 28a74299778cdad4ea999e4ee8f8c1ef793338bd
commit-date: 2017-04-13
host: x86_64-apple-darwin
release: 1.18.0-nightly
LLVM version: 3.9

Have warnings in this version:

rustdoc 1.18.0-nightly (9f2abadca 2017-04-18)
binary: rustdoc
commit-hash: 9f2abadca2d065bf81772cb84981d0a22d8e98b3
commit-date: 2017-04-18
host: x86_64-apple-darwin
release: 1.18.0-nightly
LLVM version: 3.9

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsT-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

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions