Skip to content

Allow documentation to be read from an external file #15470

@huonw

Description

@huonw

I.e. the following are equivalent:

lib.rs

//! Foo bar baz

lib.rs

#![doc(file = "extensive_crate_docs.md")]

extensive_crate_docs.md:

Foo bar baz

This could be used in the rust source for modules like borrowck::doc: having that as a separate .../borrowck/doc.md file with #[doc(file="doc.md")] mod doc {} in .../borrowck/mod.rs might be nice (it would certainly make editing it more natural, as editors will automatically select the Markdown mode).

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-enhancementCategory: An issue proposing an enhancement or a PR with one.T-dev-toolsRelevant to the dev-tools subteam, which will review and decide on the PR/issue.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions