-
-
Notifications
You must be signed in to change notification settings - Fork 80
/
Copy pathtrait_now_doc_hidden.ron
49 lines (46 loc) · 1.72 KB
/
trait_now_doc_hidden.ron
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
SemverQuery(
id: "trait_now_doc_hidden",
human_readable_name: "pub trait is now #[doc(hidden)]",
description: "A pub trait is now marked #[doc(hidden)] and is thus no longer part of the public API.",
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 Trait {
visibility_limit @filter(op: "=", value: ["$public"])
importable_path {
path @output @tag
public_api @filter(op: "=", value: ["$true"])
}
}
}
}
current {
item {
... on Trait {
visibility_limit @filter(op: "=", value: ["$public"])
trait_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 trait is now #[doc(hidden)], removing it from the crate's public API.",
per_result_error_template: Some("trait {{trait_name}} in file {{span_filename}}:{{span_begin_line}}"),
)