1use std::collections::HashSet;
2use std::sync::LazyLock;
3
4pub(crate) static KNOWN_DIRECTIVE_NAMES_SET: LazyLock<HashSet<&str>> =
5 LazyLock::new(|| KNOWN_DIRECTIVE_NAMES.iter().copied().collect());
6
7pub(crate) const KNOWN_DIRECTIVE_NAMES: &[&str] = &[
11 "add-minicore",
13 "assembly-output",
14 "aux-bin",
15 "aux-build",
16 "aux-codegen-backend",
17 "aux-crate",
18 "build-aux-docs",
19 "build-fail",
20 "build-pass",
21 "cdb-check",
22 "cdb-command",
23 "check-fail",
24 "check-pass",
25 "check-run-results",
26 "check-stdout",
27 "check-test-line-numbers-match",
28 "compare-output-by-lines",
29 "compile-flags",
30 "disable-gdb-pretty-printers",
31 "doc-flags",
32 "dont-check-compiler-stderr",
33 "dont-check-compiler-stdout",
34 "dont-check-failure-status",
35 "dont-require-annotations",
36 "edition",
37 "error-pattern",
38 "exact-llvm-major-version",
39 "exec-env",
40 "failure-status",
41 "filecheck-flags",
42 "forbid-output",
43 "force-host",
44 "gdb-check",
45 "gdb-command",
46 "gdb-repr",
47 "ignore-16bit",
48 "ignore-32bit",
49 "ignore-64bit",
50 "ignore-aarch64",
51 "ignore-aarch64-pc-windows-msvc",
52 "ignore-aarch64-unknown-linux-gnu",
53 "ignore-aix",
54 "ignore-android",
55 "ignore-apple",
56 "ignore-arm",
57 "ignore-arm-unknown-linux-gnueabi",
58 "ignore-arm-unknown-linux-gnueabihf",
59 "ignore-arm-unknown-linux-musleabi",
60 "ignore-arm-unknown-linux-musleabihf",
61 "ignore-auxiliary",
62 "ignore-avr",
63 "ignore-backends",
64 "ignore-beta",
65 "ignore-bpf",
66 "ignore-cdb",
67 "ignore-compare-mode-next-solver",
68 "ignore-compare-mode-polonius",
69 "ignore-coverage-map",
70 "ignore-coverage-run",
71 "ignore-cross-compile",
72 "ignore-csky",
73 "ignore-eabi",
74 "ignore-elf",
75 "ignore-emscripten",
76 "ignore-endian-big",
77 "ignore-enzyme",
78 "ignore-freebsd",
79 "ignore-fuchsia",
80 "ignore-gdb",
81 "ignore-gdb-version",
82 "ignore-gnu",
83 "ignore-haiku",
84 "ignore-horizon",
85 "ignore-i586",
86 "ignore-i686-pc-windows-gnu",
87 "ignore-i686-pc-windows-msvc",
88 "ignore-illumos",
89 "ignore-ios",
90 "ignore-linux",
91 "ignore-lldb",
92 "ignore-llvm-version",
93 "ignore-loongarch32",
94 "ignore-loongarch64",
95 "ignore-macabi",
96 "ignore-macos",
97 "ignore-mips",
98 "ignore-mips64",
99 "ignore-msp430",
100 "ignore-msvc",
101 "ignore-musl",
102 "ignore-netbsd",
103 "ignore-nightly",
104 "ignore-none",
105 "ignore-nto",
106 "ignore-nvptx64",
107 "ignore-nvptx64-nvidia-cuda",
108 "ignore-ohos",
109 "ignore-openbsd",
110 "ignore-parallel-frontend",
111 "ignore-pauthtest",
112 "ignore-powerpc",
113 "ignore-powerpc64",
114 "ignore-qnx",
115 "ignore-remote",
116 "ignore-riscv32",
117 "ignore-riscv64",
118 "ignore-rustc-debug-assertions",
119 "ignore-rustc_abi-x86-sse2",
120 "ignore-s390x",
121 "ignore-sgx",
122 "ignore-sparc64",
123 "ignore-spirv",
124 "ignore-stable",
125 "ignore-stage1",
126 "ignore-stage2",
127 "ignore-std-debug-assertions",
128 "ignore-test",
129 "ignore-thumb",
130 "ignore-thumbv8m.base-none-eabi",
131 "ignore-thumbv8m.main-none-eabi",
132 "ignore-tvos",
133 "ignore-uefi",
134 "ignore-unix",
135 "ignore-unknown",
136 "ignore-uwp",
137 "ignore-visionos",
138 "ignore-vxworks",
139 "ignore-wasi",
140 "ignore-wasm",
141 "ignore-wasm-proc-macros",
142 "ignore-wasm32",
143 "ignore-wasm32-unknown-unknown",
144 "ignore-wasm64",
145 "ignore-watchos",
146 "ignore-windows",
147 "ignore-windows-gnu",
148 "ignore-windows-msvc",
149 "ignore-x32",
150 "ignore-x86",
151 "ignore-x86_64",
152 "ignore-x86_64-apple-darwin",
153 "ignore-x86_64-pc-windows-gnu",
154 "ignore-x86_64-pc-windows-gnullvm",
155 "ignore-x86_64-unknown-linux-gnu",
156 "incremental",
157 "known-bug",
158 "lldb-check",
159 "lldb-command",
160 "lldb-repr",
161 "llvm-cov-flags",
162 "max-llvm-major-version",
163 "min-apple-lldb-version",
164 "min-cdb-version",
165 "min-gdb-version",
166 "min-llvm-lldb-version",
167 "min-llvm-version",
168 "min-system-llvm-version",
169 "minicore-compile-flags",
170 "needs-asm-ret",
171 "needs-asm-support",
172 "needs-backends",
173 "needs-crate-type",
174 "needs-deterministic-layouts",
175 "needs-dlltool",
176 "needs-dynamic-linking",
177 "needs-enzyme",
178 "needs-force-clang-based-tests",
179 "needs-git-hash",
180 "needs-llvm-components",
181 "needs-llvm-zstd",
182 "needs-offload",
183 "needs-profiler-runtime",
184 "needs-relocation-model-pic",
185 "needs-run-enabled",
186 "needs-rust-lld",
187 "needs-rustc-debug-assertions",
188 "needs-sanitizer-address",
189 "needs-sanitizer-cfi",
190 "needs-sanitizer-dataflow",
191 "needs-sanitizer-hwaddress",
192 "needs-sanitizer-kasan",
193 "needs-sanitizer-kcfi",
194 "needs-sanitizer-khwasan",
195 "needs-sanitizer-leak",
196 "needs-sanitizer-memory",
197 "needs-sanitizer-memtag",
198 "needs-sanitizer-realtime",
199 "needs-sanitizer-safestack",
200 "needs-sanitizer-shadow-call-stack",
201 "needs-sanitizer-support",
202 "needs-sanitizer-thread",
203 "needs-std-debug-assertions",
204 "needs-std-remap-debuginfo",
205 "needs-subprocess",
206 "needs-symlink",
207 "needs-target-has-atomic",
208 "needs-target-std",
209 "needs-threads",
210 "needs-unwind",
211 "needs-wasmtime",
212 "needs-xray",
213 "no-auto-check-cfg",
214 "no-pass-override",
215 "no-prefer-dynamic",
216 "normalize-stderr",
217 "normalize-stderr-32bit",
218 "normalize-stderr-64bit",
219 "normalize-stdout",
220 "only-16bit",
221 "only-32bit",
222 "only-64bit",
223 "only-aarch64",
224 "only-aarch64-apple-darwin",
225 "only-aarch64-unknown-linux-gnu",
226 "only-aarch64-unknown-uefi",
227 "only-apple",
228 "only-arm",
229 "only-arm64ec",
230 "only-armv7-unknown-linux-gnueabihf",
231 "only-avr",
232 "only-beta",
233 "only-bpf",
234 "only-cdb",
235 "only-dist",
236 "only-eabihf",
237 "only-elf",
238 "only-emscripten",
239 "only-endian-big",
240 "only-gnu",
241 "only-i686-pc-windows-gnu",
242 "only-i686-pc-windows-msvc",
243 "only-i686-unknown-linux-gnu",
244 "only-ios",
245 "only-linux",
246 "only-loongarch32",
247 "only-loongarch64",
248 "only-loongarch64-unknown-linux-gnu",
249 "only-macos",
250 "only-mips",
251 "only-mips64",
252 "only-msp430",
253 "only-msvc",
254 "only-musl",
255 "only-nightly",
256 "only-nvptx64",
257 "only-pauthtest",
258 "only-powerpc",
259 "only-riscv32",
260 "only-riscv64",
261 "only-riscv64gc-unknown-linux-gnu",
262 "only-rustc_abi-x86-sse2",
263 "only-s390x",
264 "only-sparc",
265 "only-sparc64",
266 "only-stable",
267 "only-thumb",
268 "only-tvos",
269 "only-uefi",
270 "only-unix",
271 "only-visionos",
272 "only-wasm-proc-macros",
273 "only-wasm32",
274 "only-wasm32-unknown-emscripten",
275 "only-wasm32-unknown-unknown",
276 "only-wasm32-wasip1",
277 "only-watchos",
278 "only-windows",
279 "only-windows-gnu",
280 "only-windows-msvc",
281 "only-x86",
282 "only-x86_64",
283 "only-x86_64-apple-darwin",
284 "only-x86_64-fortanix-unknown-sgx",
285 "only-x86_64-pc-windows-gnu",
286 "only-x86_64-pc-windows-gnullvm",
287 "only-x86_64-pc-windows-msvc",
288 "only-x86_64-unknown-linux-gnu",
289 "pp-exact",
290 "pretty-compare-only",
291 "pretty-mode",
292 "proc-macro",
293 "reference",
294 "regex-error-pattern",
295 "remap-src-base",
296 "revisions",
297 "run-crash",
298 "run-fail",
299 "run-fail-or-crash",
300 "run-flags",
301 "run-pass",
302 "run-rustfix",
303 "rustc-env",
304 "rustfix-only-machine-applicable",
305 "should-fail",
306 "skip-filecheck",
307 "stderr-per-bitwidth",
308 "test-mir-pass",
309 "unique-doc-out-dir",
310 "unset-exec-env",
311 "unset-rustc-env",
312 "unused-revision-names",
314 "use-rustdoc-cci-doc-meta-merge",
315 ];
317
318pub(crate) const KNOWN_HTMLDOCCK_DIRECTIVE_NAMES: &[&str] = &[
319 "count",
320 "!count",
321 "files",
322 "!files",
323 "has",
324 "!has",
325 "has-dir",
326 "!has-dir",
327 "hasraw",
328 "!hasraw",
329 "matches",
330 "!matches",
331 "matchesraw",
332 "!matchesraw",
333 "snapshot",
334 "!snapshot",
335];
336
337pub(crate) const KNOWN_JSONDOCCK_DIRECTIVE_NAMES: &[&str] = &[
338 "count",
339 "!count",
340 "has",
341 "!has",
342 "is",
343 "!is",
344 "ismany",
345 "!ismany",
346 "set",
347 "jq_count",
348 "!jq_count",
349 "jq_has",
350 "!jq_has",
351 "jq_is",
352 "!jq_is",
353 "jq_ismany",
354 "!jq_ismany",
355 "jq_set",
356];