-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Add support for #[doc(since="version")] attribute #74182
Copy link
Copy link
Open
Labels
C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-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.needs-rfcThis change is large or controversial enough that it should have an RFC accepted before doing it.This change is large or controversial enough that it should have an RFC accepted before doing it.
Metadata
Metadata
Assignees
Labels
C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-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.needs-rfcThis change is large or controversial enough that it should have an RFC accepted before doing it.This change is large or controversial enough that it should have an RFC accepted before doing it.
Type
Fields
Give feedbackNo fields configured for issues without a type.
To the present day, the internal crates like
coreandstdcan annotate things with#[stable(since="version")]. This is extremely useful for users, especially becauserustdocis able to write this information in the rendered documentation.Unfortunately, this kind of feature is not available for normal crates. Take, for instance,
tokio::runtime::Handle::current: this function is available since version0.2.8of thetokiocrate (not sure about0.2.7, that's not the point), but this information is not available at a first glimpse.IMHO, adding the possibility of annotating functions, structs and traits (and maybe something I missed) with
#[doc(since="version")]would give more doc power to crates' authors. Moreover, it should be possible to leverage the current implementation ofstable(since="version")in order to introduce the feature without reinventing the wheel.