Rename doc(primitive) into rustc_doc_primitive
This commit is contained in:
parent
789ee5e433
commit
f40aa598e9
@ -225,7 +225,7 @@ pub fn set(&self, features: &mut Features, span: Span) {
|
||||
(active, rustc_allow_const_fn_unstable, "1.49.0", Some(69399), None),
|
||||
/// Allows using compiler's own crates.
|
||||
(active, rustc_private, "1.0.0", Some(27812), None),
|
||||
/// Allows using internal rustdoc features like `doc(primitive)` or `doc(keyword)`.
|
||||
/// Allows using internal rustdoc features like `doc(keyword)`.
|
||||
(active, rustdoc_internals, "1.58.0", Some(90418), None),
|
||||
/// Allows using the `rustdoc::missing_doc_code_examples` lint
|
||||
(active, rustdoc_missing_doc_code_examples, "1.31.0", Some(101730), None),
|
||||
|
@ -778,6 +778,10 @@ pub struct BuiltinAttribute {
|
||||
definition of a trait, it's currently in experimental form and should be changed before \
|
||||
being exposed outside of the std"
|
||||
),
|
||||
rustc_attr!(
|
||||
rustc_doc_primitive, Normal, template!(NameValueStr: "primitive name"), ErrorFollowing,
|
||||
r#"`rustc_doc_primitive` is a rustc internal attribute"#,
|
||||
),
|
||||
|
||||
// ==========================================================================
|
||||
// Internal attributes, Testing:
|
||||
|
@ -148,9 +148,6 @@ passes_doc_test_unknown =
|
||||
passes_doc_test_takes_list =
|
||||
`#[doc(test(...)]` takes a list of attributes
|
||||
|
||||
passes_doc_primitive =
|
||||
`doc(primitive)` should never have been stable
|
||||
|
||||
passes_doc_cfg_hide_takes_list =
|
||||
`#[doc(cfg_hide(...)]` takes a list of attributes
|
||||
|
||||
|
@ -1109,17 +1109,6 @@ fn check_doc_attrs(
|
||||
}
|
||||
}
|
||||
|
||||
sym::primitive => {
|
||||
if !self.tcx.features().rustdoc_internals {
|
||||
self.tcx.emit_spanned_lint(
|
||||
INVALID_DOC_ATTRIBUTES,
|
||||
hir_id,
|
||||
i_meta.span,
|
||||
errors::DocPrimitive,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
_ => {
|
||||
let path = rustc_ast_pretty::pprust::path_to_string(&i_meta.path);
|
||||
if i_meta.has_name(sym::spotlight) {
|
||||
|
@ -288,10 +288,6 @@ pub struct DocTestUnknown {
|
||||
#[diag(passes_doc_cfg_hide_takes_list)]
|
||||
pub struct DocCfgHideTakesList;
|
||||
|
||||
#[derive(LintDiagnostic)]
|
||||
#[diag(passes_doc_primitive)]
|
||||
pub struct DocPrimitive;
|
||||
|
||||
#[derive(LintDiagnostic)]
|
||||
#[diag(passes_doc_test_unknown_any)]
|
||||
pub struct DocTestUnknownAny {
|
||||
|
@ -1245,6 +1245,7 @@
|
||||
rustc_diagnostic_macros,
|
||||
rustc_dirty,
|
||||
rustc_do_not_const_check,
|
||||
rustc_doc_primitive,
|
||||
rustc_dummy,
|
||||
rustc_dump_env_program_clauses,
|
||||
rustc_dump_program_clauses,
|
||||
|
Loading…
Reference in New Issue
Block a user