Description
This is a tracking issue for using #[doc(primitive)]
.
The feature gate for the issue is #![feature(doc_primitive)]
.
This feature is not meant to ever become stable. It is an implementation detail of the standard library.
Due to an oversight when releasing Rust 1.0, this could previously be used without a feature gate. That was a bug: this feature is not useful to anyone other than the standard library, and the behavior when multiple crates use doc(primitive)
at once is unspecified (see "Breaking changes to doc(primitive)" in #87073). To avoid needlessly breaking crates, anyone using doc(primitive)
without a feature gate will get a future-incompat warning instead of a hard error.
#[doc(primitive)]
still has an effect even without the feature gate, but the behavior is still unspecified when more than one crate has the same primitive
attribute. Once #87073 is merged and core
starts documenting all primitives, it will be completely unspecified whether the new documentation is used or not.
About tracking issues
Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.
Steps
- Initial implementation: Add future-incompat lint for
doc(primitive)
#87050 - Make this a hard error
Unresolved Questions
Does this need an edition to become a hard error? Crater hasn't found any crates using this attribute: #87050 (comment)