Rename doc(primitive) into rustc_doc_primitive
This commit is contained in:
parent
789ee5e433
commit
f40aa598e9
6 changed files with 6 additions and 19 deletions
|
@ -225,7 +225,7 @@ declare_features! (
|
||||||
(active, rustc_allow_const_fn_unstable, "1.49.0", Some(69399), None),
|
(active, rustc_allow_const_fn_unstable, "1.49.0", Some(69399), None),
|
||||||
/// Allows using compiler's own crates.
|
/// Allows using compiler's own crates.
|
||||||
(active, rustc_private, "1.0.0", Some(27812), None),
|
(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),
|
(active, rustdoc_internals, "1.58.0", Some(90418), None),
|
||||||
/// Allows using the `rustdoc::missing_doc_code_examples` lint
|
/// Allows using the `rustdoc::missing_doc_code_examples` lint
|
||||||
(active, rustdoc_missing_doc_code_examples, "1.31.0", Some(101730), None),
|
(active, rustdoc_missing_doc_code_examples, "1.31.0", Some(101730), None),
|
||||||
|
|
|
@ -778,6 +778,10 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
|
||||||
definition of a trait, it's currently in experimental form and should be changed before \
|
definition of a trait, it's currently in experimental form and should be changed before \
|
||||||
being exposed outside of the std"
|
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:
|
// Internal attributes, Testing:
|
||||||
|
|
|
@ -148,9 +148,6 @@ passes_doc_test_unknown =
|
||||||
passes_doc_test_takes_list =
|
passes_doc_test_takes_list =
|
||||||
`#[doc(test(...)]` takes a list of attributes
|
`#[doc(test(...)]` takes a list of attributes
|
||||||
|
|
||||||
passes_doc_primitive =
|
|
||||||
`doc(primitive)` should never have been stable
|
|
||||||
|
|
||||||
passes_doc_cfg_hide_takes_list =
|
passes_doc_cfg_hide_takes_list =
|
||||||
`#[doc(cfg_hide(...)]` takes a list of attributes
|
`#[doc(cfg_hide(...)]` takes a list of attributes
|
||||||
|
|
||||||
|
|
|
@ -1109,17 +1109,6 @@ impl CheckAttrVisitor<'_> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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);
|
let path = rustc_ast_pretty::pprust::path_to_string(&i_meta.path);
|
||||||
if i_meta.has_name(sym::spotlight) {
|
if i_meta.has_name(sym::spotlight) {
|
||||||
|
|
|
@ -288,10 +288,6 @@ pub struct DocTestTakesList;
|
||||||
#[diag(passes_doc_cfg_hide_takes_list)]
|
#[diag(passes_doc_cfg_hide_takes_list)]
|
||||||
pub struct DocCfgHideTakesList;
|
pub struct DocCfgHideTakesList;
|
||||||
|
|
||||||
#[derive(LintDiagnostic)]
|
|
||||||
#[diag(passes_doc_primitive)]
|
|
||||||
pub struct DocPrimitive;
|
|
||||||
|
|
||||||
#[derive(LintDiagnostic)]
|
#[derive(LintDiagnostic)]
|
||||||
#[diag(passes_doc_test_unknown_any)]
|
#[diag(passes_doc_test_unknown_any)]
|
||||||
pub struct DocTestUnknownAny {
|
pub struct DocTestUnknownAny {
|
||||||
|
|
|
@ -1245,6 +1245,7 @@ symbols! {
|
||||||
rustc_diagnostic_macros,
|
rustc_diagnostic_macros,
|
||||||
rustc_dirty,
|
rustc_dirty,
|
||||||
rustc_do_not_const_check,
|
rustc_do_not_const_check,
|
||||||
|
rustc_doc_primitive,
|
||||||
rustc_dummy,
|
rustc_dummy,
|
||||||
rustc_dump_env_program_clauses,
|
rustc_dump_env_program_clauses,
|
||||||
rustc_dump_program_clauses,
|
rustc_dump_program_clauses,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue