SemverQuery(
id: "union_now_doc_hidden",
human_readable_name: "pub union is now #[doc(hidden)]",
description: "A pub union is now marked #[doc(hidden)] and is thus no longer part of the public API.",
required_update: Major,
reference_link: Some("https://doc.rust-lang.org/rustdoc/write-documentation/the-doc-attribute.html#hidden"),
query: r#"
{
CrateDiff {
baseline {
item {
... on Union {
visibility_limit @filter(op: "=", value: ["$public"])
importable_path {
path @output @tag
public_api @filter(op: "=", value: ["$true"])
}
}
}
}
current {
item {
... on Union {
visibility_limit @filter(op: "=", value: ["$public"])
union_name: name @output
importable_path {
path @filter(op: "=", value: ["%path"])
public_api @filter(op: "!=", value: ["$true"])
}
span_: span @optional {
filename @output
begin_line @output
}
}
}
}
}
}"#,
arguments: {
"public": "public",
"true": true,
},
error_message: "A pub union is now #[doc(hidden)], removing it from the crate's public API.",
per_result_error_template: Some("union {{union_name}} in file {{span_filename}}:{{span_begin_line}}"),
)