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 "ignore-16bit",
47 "ignore-32bit",
48 "ignore-64bit",
49 "ignore-aarch64",
50 "ignore-aarch64-pc-windows-msvc",
51 "ignore-aarch64-unknown-linux-gnu",
52 "ignore-aix",
53 "ignore-android",
54 "ignore-apple",
55 "ignore-arm",
56 "ignore-arm-unknown-linux-gnueabi",
57 "ignore-arm-unknown-linux-gnueabihf",
58 "ignore-arm-unknown-linux-musleabi",
59 "ignore-arm-unknown-linux-musleabihf",
60 "ignore-auxiliary",
61 "ignore-avr",
62 "ignore-backends",
63 "ignore-beta",
64 "ignore-cdb",
65 "ignore-compare-mode-next-solver",
66 "ignore-compare-mode-polonius",
67 "ignore-coverage-map",
68 "ignore-coverage-run",
69 "ignore-cross-compile",
70 "ignore-eabi",
71 "ignore-elf",
72 "ignore-emscripten",
73 "ignore-endian-big",
74 "ignore-enzyme",
75 "ignore-freebsd",
76 "ignore-fuchsia",
77 "ignore-gdb",
78 "ignore-gdb-version",
79 "ignore-gnu",
80 "ignore-haiku",
81 "ignore-horizon",
82 "ignore-i586",
83 "ignore-i686-pc-windows-gnu",
84 "ignore-i686-pc-windows-msvc",
85 "ignore-illumos",
86 "ignore-ios",
87 "ignore-linux",
88 "ignore-lldb",
89 "ignore-llvm-version",
90 "ignore-loongarch32",
91 "ignore-loongarch64",
92 "ignore-macabi",
93 "ignore-macos",
94 "ignore-msp430",
95 "ignore-msvc",
96 "ignore-musl",
97 "ignore-netbsd",
98 "ignore-nightly",
99 "ignore-none",
100 "ignore-nto",
101 "ignore-nvptx64",
102 "ignore-nvptx64-nvidia-cuda",
103 "ignore-openbsd",
104 "ignore-pass",
105 "ignore-powerpc",
106 "ignore-powerpc64",
107 "ignore-remote",
108 "ignore-riscv64",
109 "ignore-rustc-debug-assertions",
110 "ignore-rustc_abi-x86-sse2",
111 "ignore-s390x",
112 "ignore-sgx",
113 "ignore-sparc64",
114 "ignore-spirv",
115 "ignore-stable",
116 "ignore-stage1",
117 "ignore-stage2",
118 "ignore-std-debug-assertions",
119 "ignore-test",
120 "ignore-thumb",
121 "ignore-thumbv8m.base-none-eabi",
122 "ignore-thumbv8m.main-none-eabi",
123 "ignore-tvos",
124 "ignore-uefi",
125 "ignore-unix",
126 "ignore-unknown",
127 "ignore-uwp",
128 "ignore-visionos",
129 "ignore-vxworks",
130 "ignore-wasi",
131 "ignore-wasm",
132 "ignore-wasm32",
133 "ignore-wasm32-unknown-unknown",
134 "ignore-wasm64",
135 "ignore-watchos",
136 "ignore-windows",
137 "ignore-windows-gnu",
138 "ignore-windows-msvc",
139 "ignore-x32",
140 "ignore-x86",
141 "ignore-x86_64",
142 "ignore-x86_64-apple-darwin",
143 "ignore-x86_64-pc-windows-gnu",
144 "ignore-x86_64-unknown-linux-gnu",
145 "incremental",
146 "known-bug",
147 "lldb-check",
148 "lldb-command",
149 "llvm-cov-flags",
150 "max-llvm-major-version",
151 "min-cdb-version",
152 "min-gdb-version",
153 "min-lldb-version",
154 "min-llvm-version",
155 "min-system-llvm-version",
156 "minicore-compile-flags",
157 "needs-asm-support",
158 "needs-backends",
159 "needs-crate-type",
160 "needs-deterministic-layouts",
161 "needs-dlltool",
162 "needs-dynamic-linking",
163 "needs-enzyme",
164 "needs-force-clang-based-tests",
165 "needs-git-hash",
166 "needs-llvm-components",
167 "needs-llvm-zstd",
168 "needs-profiler-runtime",
169 "needs-relocation-model-pic",
170 "needs-run-enabled",
171 "needs-rust-lld",
172 "needs-rustc-debug-assertions",
173 "needs-sanitizer-address",
174 "needs-sanitizer-cfi",
175 "needs-sanitizer-dataflow",
176 "needs-sanitizer-hwaddress",
177 "needs-sanitizer-kcfi",
178 "needs-sanitizer-leak",
179 "needs-sanitizer-memory",
180 "needs-sanitizer-memtag",
181 "needs-sanitizer-realtime",
182 "needs-sanitizer-safestack",
183 "needs-sanitizer-shadow-call-stack",
184 "needs-sanitizer-support",
185 "needs-sanitizer-thread",
186 "needs-std-debug-assertions",
187 "needs-subprocess",
188 "needs-symlink",
189 "needs-target-has-atomic",
190 "needs-target-std",
191 "needs-threads",
192 "needs-unwind",
193 "needs-wasmtime",
194 "needs-xray",
195 "no-auto-check-cfg",
196 "no-prefer-dynamic",
197 "normalize-stderr",
198 "normalize-stderr-32bit",
199 "normalize-stderr-64bit",
200 "normalize-stdout",
201 "only-16bit",
202 "only-32bit",
203 "only-64bit",
204 "only-aarch64",
205 "only-aarch64-apple-darwin",
206 "only-aarch64-unknown-linux-gnu",
207 "only-aarch64-unknown-uefi",
208 "only-apple",
209 "only-arm",
210 "only-arm64ec",
211 "only-avr",
212 "only-beta",
213 "only-bpf",
214 "only-cdb",
215 "only-dist",
216 "only-eabihf",
217 "only-elf",
218 "only-emscripten",
219 "only-gnu",
220 "only-i686-pc-windows-gnu",
221 "only-i686-pc-windows-msvc",
222 "only-i686-unknown-linux-gnu",
223 "only-ios",
224 "only-linux",
225 "only-loongarch32",
226 "only-loongarch64",
227 "only-loongarch64-unknown-linux-gnu",
228 "only-macos",
229 "only-mips",
230 "only-mips64",
231 "only-msp430",
232 "only-msvc",
233 "only-musl",
234 "only-nightly",
235 "only-nvptx64",
236 "only-powerpc",
237 "only-riscv32",
238 "only-riscv64",
239 "only-rustc_abi-x86-sse2",
240 "only-s390x",
241 "only-sparc",
242 "only-sparc64",
243 "only-stable",
244 "only-thumb",
245 "only-tvos",
246 "only-uefi",
247 "only-unix",
248 "only-visionos",
249 "only-wasm32",
250 "only-wasm32-unknown-unknown",
251 "only-wasm32-wasip1",
252 "only-watchos",
253 "only-windows",
254 "only-windows-gnu",
255 "only-windows-msvc",
256 "only-x86",
257 "only-x86_64",
258 "only-x86_64-apple-darwin",
259 "only-x86_64-fortanix-unknown-sgx",
260 "only-x86_64-pc-windows-gnu",
261 "only-x86_64-pc-windows-msvc",
262 "only-x86_64-unknown-linux-gnu",
263 "pp-exact",
264 "pretty-compare-only",
265 "pretty-mode",
266 "proc-macro",
267 "reference",
268 "regex-error-pattern",
269 "remap-src-base",
270 "revisions",
271 "run-crash",
272 "run-fail",
273 "run-fail-or-crash",
274 "run-flags",
275 "run-pass",
276 "run-rustfix",
277 "rustc-env",
278 "rustfix-only-machine-applicable",
279 "should-fail",
280 "should-ice",
281 "stderr-per-bitwidth",
282 "test-mir-pass",
283 "unique-doc-out-dir",
284 "unset-exec-env",
285 "unset-rustc-env",
286 "unused-revision-names",
288 ];
290
291pub(crate) const KNOWN_HTMLDOCCK_DIRECTIVE_NAMES: &[&str] = &[
292 "count",
293 "!count",
294 "files",
295 "!files",
296 "has",
297 "!has",
298 "has-dir",
299 "!has-dir",
300 "hasraw",
301 "!hasraw",
302 "matches",
303 "!matches",
304 "matchesraw",
305 "!matchesraw",
306 "snapshot",
307 "!snapshot",
308];
309
310pub(crate) const KNOWN_JSONDOCCK_DIRECTIVE_NAMES: &[&str] =
311 &["count", "!count", "has", "!has", "is", "!is", "ismany", "!ismany", "set", "!set"];