Skip to content

cargo +nightly doc panics for crates depending on gfx-backend-empty #70874

Closed
@grovesNL

Description

@grovesNL

If I create a new crate with

cargo new --lib rustdocissue

Then add a dependency on gfx-backend-empty version 0.5:

[dependencies]
gfx-backend-empty = "0.5"

Then run cargo doc on stable:

cargo +stable doc --lib --no-deps

cargo doc succeeds with warnings. I'm not sure if the warnings are relevant, but the warnings in cargo +stable doc are for some empty blocks in examples that haven't been populated, such as:

/// ```no_run
///
/// ```

Now if I run the same command on nightly (nightly-2020-04-06):

cargo +nightly doc --lib --no-deps

cargo doc panics with the following error:

thread 'rustc' panicked at 'could not find markdown in source', src/librustdoc/passes/mod.rs:411:31

The panic originates in

let source_line = src_lines.next().expect("could not find markdown in source");

Besides stable and nightly, I tried the nightly-2020-03-19 toolchain which succeeds with warnings (like stable).

I also created a repo which reproduces the issue at https://github.com/grovesNL/rustdocissue if it's convenient to clone that instead of following the steps above.

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-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