compiletest/directives/
directive_names.rs

1/// This was originally generated by collecting directives from ui tests and then extracting their
2/// directive names. This is **not** an exhaustive list of all possible directives. Instead, this is
3/// a best-effort approximation for diagnostics. Add new directives to this list when needed.
4pub(crate) const KNOWN_DIRECTIVE_NAMES: &[&str] = &[
5    // tidy-alphabetical-start
6    "add-minicore",
7    "assembly-output",
8    "aux-bin",
9    "aux-build",
10    "aux-codegen-backend",
11    "aux-crate",
12    "build-aux-docs",
13    "build-fail",
14    "build-pass",
15    "check-fail",
16    "check-pass",
17    "check-run-results",
18    "check-stdout",
19    "check-test-line-numbers-match",
20    "compare-output-by-lines",
21    "compile-flags",
22    "disable-gdb-pretty-printers",
23    "doc-flags",
24    "dont-check-compiler-stderr",
25    "dont-check-compiler-stdout",
26    "dont-check-failure-status",
27    "dont-require-annotations",
28    "edition",
29    "error-pattern",
30    "exact-llvm-major-version",
31    "exec-env",
32    "failure-status",
33    "filecheck-flags",
34    "forbid-output",
35    "force-host",
36    "ignore-16bit",
37    "ignore-32bit",
38    "ignore-64bit",
39    "ignore-aarch64",
40    "ignore-aarch64-pc-windows-msvc",
41    "ignore-aarch64-unknown-linux-gnu",
42    "ignore-aix",
43    "ignore-android",
44    "ignore-apple",
45    "ignore-arm",
46    "ignore-arm-unknown-linux-gnueabi",
47    "ignore-arm-unknown-linux-gnueabihf",
48    "ignore-arm-unknown-linux-musleabi",
49    "ignore-arm-unknown-linux-musleabihf",
50    "ignore-auxiliary",
51    "ignore-avr",
52    "ignore-backends",
53    "ignore-beta",
54    "ignore-cdb",
55    "ignore-compare-mode-next-solver",
56    "ignore-compare-mode-polonius",
57    "ignore-coverage-map",
58    "ignore-coverage-run",
59    "ignore-cross-compile",
60    "ignore-eabi",
61    "ignore-elf",
62    "ignore-emscripten",
63    "ignore-endian-big",
64    "ignore-enzyme",
65    "ignore-freebsd",
66    "ignore-fuchsia",
67    "ignore-gdb",
68    "ignore-gdb-version",
69    "ignore-gnu",
70    "ignore-haiku",
71    "ignore-horizon",
72    "ignore-i586",
73    "ignore-i686-pc-windows-gnu",
74    "ignore-i686-pc-windows-msvc",
75    "ignore-illumos",
76    "ignore-ios",
77    "ignore-linux",
78    "ignore-lldb",
79    "ignore-llvm-version",
80    "ignore-loongarch32",
81    "ignore-loongarch64",
82    "ignore-macabi",
83    "ignore-macos",
84    "ignore-msp430",
85    "ignore-msvc",
86    "ignore-musl",
87    "ignore-netbsd",
88    "ignore-nightly",
89    "ignore-none",
90    "ignore-nto",
91    "ignore-nvptx64",
92    "ignore-nvptx64-nvidia-cuda",
93    "ignore-openbsd",
94    "ignore-pass",
95    "ignore-powerpc",
96    "ignore-powerpc64",
97    "ignore-remote",
98    "ignore-riscv64",
99    "ignore-rustc-debug-assertions",
100    "ignore-rustc_abi-x86-sse2",
101    "ignore-s390x",
102    "ignore-sgx",
103    "ignore-sparc64",
104    "ignore-spirv",
105    "ignore-stable",
106    "ignore-stage1",
107    "ignore-stage2",
108    "ignore-std-debug-assertions",
109    "ignore-test",
110    "ignore-thumb",
111    "ignore-thumbv8m.base-none-eabi",
112    "ignore-thumbv8m.main-none-eabi",
113    "ignore-tvos",
114    "ignore-unix",
115    "ignore-unknown",
116    "ignore-uwp",
117    "ignore-visionos",
118    "ignore-vxworks",
119    "ignore-wasi",
120    "ignore-wasm",
121    "ignore-wasm32",
122    "ignore-wasm32-bare",
123    "ignore-wasm64",
124    "ignore-watchos",
125    "ignore-windows",
126    "ignore-windows-gnu",
127    "ignore-windows-msvc",
128    "ignore-x32",
129    "ignore-x86",
130    "ignore-x86_64",
131    "ignore-x86_64-apple-darwin",
132    "ignore-x86_64-pc-windows-gnu",
133    "ignore-x86_64-unknown-linux-gnu",
134    "incremental",
135    "known-bug",
136    "llvm-cov-flags",
137    "max-llvm-major-version",
138    "min-cdb-version",
139    "min-gdb-version",
140    "min-lldb-version",
141    "min-llvm-version",
142    "min-system-llvm-version",
143    "minicore-compile-flags",
144    "needs-asm-support",
145    "needs-backends",
146    "needs-crate-type",
147    "needs-deterministic-layouts",
148    "needs-dlltool",
149    "needs-dynamic-linking",
150    "needs-enzyme",
151    "needs-force-clang-based-tests",
152    "needs-git-hash",
153    "needs-llvm-components",
154    "needs-llvm-zstd",
155    "needs-profiler-runtime",
156    "needs-relocation-model-pic",
157    "needs-run-enabled",
158    "needs-rust-lld",
159    "needs-rustc-debug-assertions",
160    "needs-sanitizer-address",
161    "needs-sanitizer-cfi",
162    "needs-sanitizer-dataflow",
163    "needs-sanitizer-hwaddress",
164    "needs-sanitizer-kcfi",
165    "needs-sanitizer-leak",
166    "needs-sanitizer-memory",
167    "needs-sanitizer-memtag",
168    "needs-sanitizer-realtime",
169    "needs-sanitizer-safestack",
170    "needs-sanitizer-shadow-call-stack",
171    "needs-sanitizer-support",
172    "needs-sanitizer-thread",
173    "needs-std-debug-assertions",
174    "needs-subprocess",
175    "needs-symlink",
176    "needs-target-has-atomic",
177    "needs-target-std",
178    "needs-threads",
179    "needs-unwind",
180    "needs-wasmtime",
181    "needs-xray",
182    "no-auto-check-cfg",
183    "no-prefer-dynamic",
184    "normalize-stderr",
185    "normalize-stderr-32bit",
186    "normalize-stderr-64bit",
187    "normalize-stdout",
188    "only-16bit",
189    "only-32bit",
190    "only-64bit",
191    "only-aarch64",
192    "only-aarch64-apple-darwin",
193    "only-aarch64-unknown-linux-gnu",
194    "only-aarch64-unknown-uefi",
195    "only-apple",
196    "only-arm",
197    "only-arm64ec",
198    "only-avr",
199    "only-beta",
200    "only-bpf",
201    "only-cdb",
202    "only-dist",
203    "only-eabihf",
204    "only-elf",
205    "only-emscripten",
206    "only-gnu",
207    "only-i686-pc-windows-gnu",
208    "only-i686-pc-windows-msvc",
209    "only-i686-unknown-linux-gnu",
210    "only-ios",
211    "only-linux",
212    "only-loongarch32",
213    "only-loongarch64",
214    "only-loongarch64-unknown-linux-gnu",
215    "only-macos",
216    "only-mips",
217    "only-mips64",
218    "only-msp430",
219    "only-msvc",
220    "only-musl",
221    "only-nightly",
222    "only-nvptx64",
223    "only-powerpc",
224    "only-riscv32",
225    "only-riscv64",
226    "only-rustc_abi-x86-sse2",
227    "only-s390x",
228    "only-sparc",
229    "only-sparc64",
230    "only-stable",
231    "only-thumb",
232    "only-tvos",
233    "only-uefi",
234    "only-unix",
235    "only-visionos",
236    "only-wasm32",
237    "only-wasm32-bare",
238    "only-wasm32-wasip1",
239    "only-watchos",
240    "only-windows",
241    "only-windows-gnu",
242    "only-windows-msvc",
243    "only-x86",
244    "only-x86_64",
245    "only-x86_64-apple-darwin",
246    "only-x86_64-fortanix-unknown-sgx",
247    "only-x86_64-pc-windows-gnu",
248    "only-x86_64-pc-windows-msvc",
249    "only-x86_64-unknown-linux-gnu",
250    "pp-exact",
251    "pretty-compare-only",
252    "pretty-mode",
253    "proc-macro",
254    "reference",
255    "regex-error-pattern",
256    "remap-src-base",
257    "revisions",
258    "run-crash",
259    "run-fail",
260    "run-fail-or-crash",
261    "run-flags",
262    "run-pass",
263    "run-rustfix",
264    "rustc-env",
265    "rustfix-only-machine-applicable",
266    "should-fail",
267    "should-ice",
268    "stderr-per-bitwidth",
269    "test-mir-pass",
270    "unique-doc-out-dir",
271    "unset-exec-env",
272    "unset-rustc-env",
273    // Used by the tidy check `unknown_revision`.
274    "unused-revision-names",
275    // tidy-alphabetical-end
276];
277
278pub(crate) const KNOWN_HTMLDOCCK_DIRECTIVE_NAMES: &[&str] = &[
279    "count",
280    "!count",
281    "files",
282    "!files",
283    "has",
284    "!has",
285    "has-dir",
286    "!has-dir",
287    "hasraw",
288    "!hasraw",
289    "matches",
290    "!matches",
291    "matchesraw",
292    "!matchesraw",
293    "snapshot",
294    "!snapshot",
295];
296
297pub(crate) const KNOWN_JSONDOCCK_DIRECTIVE_NAMES: &[&str] =
298    &["count", "!count", "has", "!has", "is", "!is", "ismany", "!ismany", "set", "!set"];