-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Tracking issue: rfc 1990 - add external doc attribute to rustc #44732
Copy link
Copy link
Closed
Labels
A-attributesArea: Attributes (`#[…]`, `#![…]`)Area: Attributes (`#[…]`, `#![…]`)B-unstableBlocker: Implemented in the nightly compiler and unstable.Blocker: Implemented in the nightly compiler and unstable.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCF-external_doc`#![feature(external_doc)]``#![feature(external_doc)]`P-mediumMedium priorityMedium priorityT-dev-toolsRelevant to the dev-tools subteam, which will review and decide on the PR/issue.Relevant to the dev-tools subteam, which will review and decide on the PR/issue.T-langRelevant to the language teamRelevant to the language teamT-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-attributesArea: Attributes (`#[…]`, `#![…]`)Area: Attributes (`#[…]`, `#![…]`)B-unstableBlocker: Implemented in the nightly compiler and unstable.Blocker: Implemented in the nightly compiler and unstable.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCF-external_doc`#![feature(external_doc)]``#![feature(external_doc)]`P-mediumMedium priorityMedium priorityT-dev-toolsRelevant to the dev-tools subteam, which will review and decide on the PR/issue.Relevant to the dev-tools subteam, which will review and decide on the PR/issue.T-langRelevant to the language teamRelevant to the language teamT-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
RFC PR: rust-lang/rfcs#1990
RFC text: https://github.com/rust-lang/rfcs/blob/master/text/1990-external-doc-attribute.md
Current documentation
Summary of how to use this:
#![feature(external_doc)]to your crate."src/some-docs.md"with some docs to your crate.#[doc(include = "some-docs.md")]to something that needs some docs. The file path is relative tolib.rs, so if you want adocfolder to live alongsidesrc, then all your paths inside thedoc(include)attributes need to begin with../doc.Summary of current status:
Current tasks:
(promote the "failed to load file" warnings to proper lints?)(Make them hard errors instead, per the RFC tweaks and fixes for doc(include) #46858)