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-unix",
125 "ignore-unknown",
126 "ignore-uwp",
127 "ignore-visionos",
128 "ignore-vxworks",
129 "ignore-wasi",
130 "ignore-wasm",
131 "ignore-wasm32",
132 "ignore-wasm32-unknown-unknown",
133 "ignore-wasm64",
134 "ignore-watchos",
135 "ignore-windows",
136 "ignore-windows-gnu",
137 "ignore-windows-msvc",
138 "ignore-x32",
139 "ignore-x86",
140 "ignore-x86_64",
141 "ignore-x86_64-apple-darwin",
142 "ignore-x86_64-pc-windows-gnu",
143 "ignore-x86_64-unknown-linux-gnu",
144 "incremental",
145 "known-bug",
146 "lldb-check",
147 "lldb-command",
148 "llvm-cov-flags",
149 "max-llvm-major-version",
150 "min-cdb-version",
151 "min-gdb-version",
152 "min-lldb-version",
153 "min-llvm-version",
154 "min-system-llvm-version",
155 "minicore-compile-flags",
156 "needs-asm-support",
157 "needs-backends",
158 "needs-crate-type",
159 "needs-deterministic-layouts",
160 "needs-dlltool",
161 "needs-dynamic-linking",
162 "needs-enzyme",
163 "needs-force-clang-based-tests",
164 "needs-git-hash",
165 "needs-llvm-components",
166 "needs-llvm-zstd",
167 "needs-profiler-runtime",
168 "needs-relocation-model-pic",
169 "needs-run-enabled",
170 "needs-rust-lld",
171 "needs-rustc-debug-assertions",
172 "needs-sanitizer-address",
173 "needs-sanitizer-cfi",
174 "needs-sanitizer-dataflow",
175 "needs-sanitizer-hwaddress",
176 "needs-sanitizer-kcfi",
177 "needs-sanitizer-leak",
178 "needs-sanitizer-memory",
179 "needs-sanitizer-memtag",
180 "needs-sanitizer-realtime",
181 "needs-sanitizer-safestack",
182 "needs-sanitizer-shadow-call-stack",
183 "needs-sanitizer-support",
184 "needs-sanitizer-thread",
185 "needs-std-debug-assertions",
186 "needs-subprocess",
187 "needs-symlink",
188 "needs-target-has-atomic",
189 "needs-target-std",
190 "needs-threads",
191 "needs-unwind",
192 "needs-wasmtime",
193 "needs-xray",
194 "no-auto-check-cfg",
195 "no-prefer-dynamic",
196 "normalize-stderr",
197 "normalize-stderr-32bit",
198 "normalize-stderr-64bit",
199 "normalize-stdout",
200 "only-16bit",
201 "only-32bit",
202 "only-64bit",
203 "only-aarch64",
204 "only-aarch64-apple-darwin",
205 "only-aarch64-unknown-linux-gnu",
206 "only-aarch64-unknown-uefi",
207 "only-apple",
208 "only-arm",
209 "only-arm64ec",
210 "only-avr",
211 "only-beta",
212 "only-bpf",
213 "only-cdb",
214 "only-dist",
215 "only-eabihf",
216 "only-elf",
217 "only-emscripten",
218 "only-gnu",
219 "only-i686-pc-windows-gnu",
220 "only-i686-pc-windows-msvc",
221 "only-i686-unknown-linux-gnu",
222 "only-ios",
223 "only-linux",
224 "only-loongarch32",
225 "only-loongarch64",
226 "only-loongarch64-unknown-linux-gnu",
227 "only-macos",
228 "only-mips",
229 "only-mips64",
230 "only-msp430",
231 "only-msvc",
232 "only-musl",
233 "only-nightly",
234 "only-nvptx64",
235 "only-powerpc",
236 "only-riscv32",
237 "only-riscv64",
238 "only-rustc_abi-x86-sse2",
239 "only-s390x",
240 "only-sparc",
241 "only-sparc64",
242 "only-stable",
243 "only-thumb",
244 "only-tvos",
245 "only-uefi",
246 "only-unix",
247 "only-visionos",
248 "only-wasm32",
249 "only-wasm32-unknown-unknown",
250 "only-wasm32-wasip1",
251 "only-watchos",
252 "only-windows",
253 "only-windows-gnu",
254 "only-windows-msvc",
255 "only-x86",
256 "only-x86_64",
257 "only-x86_64-apple-darwin",
258 "only-x86_64-fortanix-unknown-sgx",
259 "only-x86_64-pc-windows-gnu",
260 "only-x86_64-pc-windows-msvc",
261 "only-x86_64-unknown-linux-gnu",
262 "pp-exact",
263 "pretty-compare-only",
264 "pretty-mode",
265 "proc-macro",
266 "reference",
267 "regex-error-pattern",
268 "remap-src-base",
269 "revisions",
270 "run-crash",
271 "run-fail",
272 "run-fail-or-crash",
273 "run-flags",
274 "run-pass",
275 "run-rustfix",
276 "rustc-env",
277 "rustfix-only-machine-applicable",
278 "should-fail",
279 "should-ice",
280 "stderr-per-bitwidth",
281 "test-mir-pass",
282 "unique-doc-out-dir",
283 "unset-exec-env",
284 "unset-rustc-env",
285 "unused-revision-names",
287 ];
289
290pub(crate) const KNOWN_HTMLDOCCK_DIRECTIVE_NAMES: &[&str] = &[
291 "count",
292 "!count",
293 "files",
294 "!files",
295 "has",
296 "!has",
297 "has-dir",
298 "!has-dir",
299 "hasraw",
300 "!hasraw",
301 "matches",
302 "!matches",
303 "matchesraw",
304 "!matchesraw",
305 "snapshot",
306 "!snapshot",
307];
308
309pub(crate) const KNOWN_JSONDOCCK_DIRECTIVE_NAMES: &[&str] =
310 &["count", "!count", "has", "!has", "is", "!is", "ismany", "!ismany", "set", "!set"];