Skip to content

document-features fails when markdown headers (##) is used in a TOML string (was "docs.rs builds failing") #25

@epage

Description

@epage
[INFO] [stderr] warning: target filter specified, but no targets matched; this is a no-op
[INFO] [stderr]  Documenting snapbox v0.6.12 (/opt/rustwide/workdir)
[INFO] [stderr] error: Comment cannot be associated with a feature: "[Unreleased] - ReleaseDate"
[INFO] [stderr]   --> src/lib.rs:44:50
[INFO] [stderr]    |
[INFO] [stderr] 44 | #![cfg_attr(feature = "document-features", doc = document_features::document_features!())]
[INFO] [stderr]    |                                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stderr]    |
[INFO] [stderr]    = note: this error originates in the macro `document_features::document_features` (in Nightly builds, run with -Z macro-backtrace for more info)

This happened on snapbox 0.6.12 (https://docs.rs/crate/snapbox/0.6.12/builds/1287788) and 0.6.11 but not before.

If you diff my package between 0.6.10 and 0.6.12, there are no relevant changes, see https://diff.rs/snapbox/0.6.10/0.6.12/Cargo.toml

In fact, [Unreleased] - ReleaseDate does not show up on a dedicated line in my ma
manifest but does show up in a nested TOML string (not on its own line)

However, I'm not able to reproduce this locally

$ RUSTFLAGS="--cfg docsrs" cargo +nightly doc --no-deps -F document-features

Anyone else seeing this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions