SemverQuery(
id: "macro_now_doc_hidden",
human_readable_name: "macro is now #[doc(hidden)]",
description: "A declarative macro that was previously part of the public API is now #[doc(hidden)], requiring downstream users to acknowledge their reliance on non-public APIs.",
required_update: Major,
lint_level: Deny,
reference_link: Some("https://doc.rust-lang.org/rustdoc/write-documentation/the-doc-attribute.html#hidden"),
query: r#"
{
CrateDiff {
baseline {
item {
... on Macro {
name @output @tag
importable_path {
path @output @tag
public_api @filter(op: "=", value: ["$true"])
}
}
}
}
current {
item {
... on Macro {
name @filter(op: "=", value: ["%name"])
importable_path {
path @filter(op: "=", value: ["%path"])
public_api @filter(op: "!=", value: ["$true"])
}
span_: span @optional {
filename @output
begin_line @output
end_line @output
}
}
}
}
}
}"#,
arguments: {
"true": true,
},
error_message: "A `macro_rules!` declarative macro that was previously part of the public API is now `#[doc(hidden)]` and not public API anymore.",
per_result_error_template: Some("macro {{name}} in {{span_filename}}:{{span_begin_line}}"),
witness: None,
)