Skip to content

Commit 68fe9dc

Browse files
authored
Unrolled build for #144662
Rollup merge of #144662 - Zalathar:directive-names, r=fmease compiletest: Move directive names back into a separate file This list no longer needs to be included in multiple crates, but having the list in its own file makes it easier to find and update when necessary. As discussed at #143850 (comment).
2 parents 72716b1 + dee2013 commit 68fe9dc

File tree

2 files changed

+293
-290
lines changed

2 files changed

+293
-290
lines changed

src/tools/compiletest/src/directives.rs

Lines changed: 4 additions & 290 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ use tracing::*;
1212
use crate::common::{CodegenBackend, Config, Debugger, FailMode, PassMode, RunFailMode, TestMode};
1313
use crate::debuggers::{extract_cdb_version, extract_gdb_version};
1414
use crate::directives::auxiliary::{AuxProps, parse_and_update_aux};
15+
use crate::directives::directive_names::{
16+
KNOWN_DIRECTIVE_NAMES, KNOWN_HTMLDOCCK_DIRECTIVE_NAMES, KNOWN_JSONDOCCK_DIRECTIVE_NAMES,
17+
};
1518
use crate::directives::needs::CachedNeedsConditions;
1619
use crate::errors::ErrorKind;
1720
use crate::executor::{CollectedTestDesc, ShouldPanic};
@@ -20,6 +23,7 @@ use crate::util::static_regex;
2023

2124
pub(crate) mod auxiliary;
2225
mod cfg;
26+
mod directive_names;
2327
mod needs;
2428
#[cfg(test)]
2529
mod tests;
@@ -769,296 +773,6 @@ fn line_directive<'line>(
769773
Some(DirectiveLine { line_number, revision, raw_directive })
770774
}
771775

772-
/// This was originally generated by collecting directives from ui tests and then extracting their
773-
/// directive names. This is **not** an exhaustive list of all possible directives. Instead, this is
774-
/// a best-effort approximation for diagnostics. Add new directives to this list when needed.
775-
const KNOWN_DIRECTIVE_NAMES: &[&str] = &[
776-
// tidy-alphabetical-start
777-
"add-core-stubs",
778-
"assembly-output",
779-
"aux-bin",
780-
"aux-build",
781-
"aux-codegen-backend",
782-
"aux-crate",
783-
"build-aux-docs",
784-
"build-fail",
785-
"build-pass",
786-
"check-fail",
787-
"check-pass",
788-
"check-run-results",
789-
"check-stdout",
790-
"check-test-line-numbers-match",
791-
"compile-flags",
792-
"doc-flags",
793-
"dont-check-compiler-stderr",
794-
"dont-check-compiler-stdout",
795-
"dont-check-failure-status",
796-
"dont-require-annotations",
797-
"edition",
798-
"error-pattern",
799-
"exact-llvm-major-version",
800-
"exec-env",
801-
"failure-status",
802-
"filecheck-flags",
803-
"forbid-output",
804-
"force-host",
805-
"ignore-16bit",
806-
"ignore-32bit",
807-
"ignore-64bit",
808-
"ignore-aarch64",
809-
"ignore-aarch64-pc-windows-msvc",
810-
"ignore-aarch64-unknown-linux-gnu",
811-
"ignore-aix",
812-
"ignore-android",
813-
"ignore-apple",
814-
"ignore-arm",
815-
"ignore-arm-unknown-linux-gnueabi",
816-
"ignore-arm-unknown-linux-gnueabihf",
817-
"ignore-arm-unknown-linux-musleabi",
818-
"ignore-arm-unknown-linux-musleabihf",
819-
"ignore-auxiliary",
820-
"ignore-avr",
821-
"ignore-backends",
822-
"ignore-beta",
823-
"ignore-cdb",
824-
"ignore-compare-mode-next-solver",
825-
"ignore-compare-mode-polonius",
826-
"ignore-coverage-map",
827-
"ignore-coverage-run",
828-
"ignore-cross-compile",
829-
"ignore-eabi",
830-
"ignore-elf",
831-
"ignore-emscripten",
832-
"ignore-endian-big",
833-
"ignore-enzyme",
834-
"ignore-freebsd",
835-
"ignore-fuchsia",
836-
"ignore-gdb",
837-
"ignore-gdb-version",
838-
"ignore-gnu",
839-
"ignore-haiku",
840-
"ignore-horizon",
841-
"ignore-i686-pc-windows-gnu",
842-
"ignore-i686-pc-windows-msvc",
843-
"ignore-illumos",
844-
"ignore-ios",
845-
"ignore-linux",
846-
"ignore-lldb",
847-
"ignore-llvm-version",
848-
"ignore-loongarch32",
849-
"ignore-loongarch64",
850-
"ignore-macabi",
851-
"ignore-macos",
852-
"ignore-msp430",
853-
"ignore-msvc",
854-
"ignore-musl",
855-
"ignore-netbsd",
856-
"ignore-nightly",
857-
"ignore-none",
858-
"ignore-nto",
859-
"ignore-nvptx64",
860-
"ignore-nvptx64-nvidia-cuda",
861-
"ignore-openbsd",
862-
"ignore-pass",
863-
"ignore-powerpc",
864-
"ignore-powerpc64",
865-
"ignore-remote",
866-
"ignore-riscv64",
867-
"ignore-rustc-debug-assertions",
868-
"ignore-rustc_abi-x86-sse2",
869-
"ignore-s390x",
870-
"ignore-sgx",
871-
"ignore-sparc64",
872-
"ignore-spirv",
873-
"ignore-stable",
874-
"ignore-stage1",
875-
"ignore-stage2",
876-
"ignore-std-debug-assertions",
877-
"ignore-test",
878-
"ignore-thumb",
879-
"ignore-thumbv8m.base-none-eabi",
880-
"ignore-thumbv8m.main-none-eabi",
881-
"ignore-tvos",
882-
"ignore-unix",
883-
"ignore-unknown",
884-
"ignore-uwp",
885-
"ignore-visionos",
886-
"ignore-vxworks",
887-
"ignore-wasi",
888-
"ignore-wasm",
889-
"ignore-wasm32",
890-
"ignore-wasm32-bare",
891-
"ignore-wasm64",
892-
"ignore-watchos",
893-
"ignore-windows",
894-
"ignore-windows-gnu",
895-
"ignore-windows-msvc",
896-
"ignore-x32",
897-
"ignore-x86",
898-
"ignore-x86_64",
899-
"ignore-x86_64-apple-darwin",
900-
"ignore-x86_64-pc-windows-gnu",
901-
"ignore-x86_64-unknown-linux-gnu",
902-
"incremental",
903-
"known-bug",
904-
"llvm-cov-flags",
905-
"max-llvm-major-version",
906-
"min-cdb-version",
907-
"min-gdb-version",
908-
"min-lldb-version",
909-
"min-llvm-version",
910-
"min-system-llvm-version",
911-
"needs-asm-support",
912-
"needs-backends",
913-
"needs-crate-type",
914-
"needs-deterministic-layouts",
915-
"needs-dlltool",
916-
"needs-dynamic-linking",
917-
"needs-enzyme",
918-
"needs-force-clang-based-tests",
919-
"needs-git-hash",
920-
"needs-llvm-components",
921-
"needs-llvm-zstd",
922-
"needs-profiler-runtime",
923-
"needs-relocation-model-pic",
924-
"needs-run-enabled",
925-
"needs-rust-lld",
926-
"needs-rustc-debug-assertions",
927-
"needs-sanitizer-address",
928-
"needs-sanitizer-cfi",
929-
"needs-sanitizer-dataflow",
930-
"needs-sanitizer-hwaddress",
931-
"needs-sanitizer-kcfi",
932-
"needs-sanitizer-leak",
933-
"needs-sanitizer-memory",
934-
"needs-sanitizer-memtag",
935-
"needs-sanitizer-safestack",
936-
"needs-sanitizer-shadow-call-stack",
937-
"needs-sanitizer-support",
938-
"needs-sanitizer-thread",
939-
"needs-std-debug-assertions",
940-
"needs-subprocess",
941-
"needs-symlink",
942-
"needs-target-has-atomic",
943-
"needs-target-std",
944-
"needs-threads",
945-
"needs-unwind",
946-
"needs-wasmtime",
947-
"needs-xray",
948-
"no-auto-check-cfg",
949-
"no-prefer-dynamic",
950-
"normalize-stderr",
951-
"normalize-stderr-32bit",
952-
"normalize-stderr-64bit",
953-
"normalize-stdout",
954-
"only-16bit",
955-
"only-32bit",
956-
"only-64bit",
957-
"only-aarch64",
958-
"only-aarch64-apple-darwin",
959-
"only-aarch64-unknown-linux-gnu",
960-
"only-apple",
961-
"only-arm",
962-
"only-avr",
963-
"only-beta",
964-
"only-bpf",
965-
"only-cdb",
966-
"only-dist",
967-
"only-elf",
968-
"only-emscripten",
969-
"only-gnu",
970-
"only-i686-pc-windows-gnu",
971-
"only-i686-pc-windows-msvc",
972-
"only-i686-unknown-linux-gnu",
973-
"only-ios",
974-
"only-linux",
975-
"only-loongarch32",
976-
"only-loongarch64",
977-
"only-loongarch64-unknown-linux-gnu",
978-
"only-macos",
979-
"only-mips",
980-
"only-mips64",
981-
"only-msp430",
982-
"only-msvc",
983-
"only-musl",
984-
"only-nightly",
985-
"only-nvptx64",
986-
"only-powerpc",
987-
"only-riscv64",
988-
"only-rustc_abi-x86-sse2",
989-
"only-s390x",
990-
"only-sparc",
991-
"only-sparc64",
992-
"only-stable",
993-
"only-thumb",
994-
"only-tvos",
995-
"only-uefi",
996-
"only-unix",
997-
"only-visionos",
998-
"only-wasm32",
999-
"only-wasm32-bare",
1000-
"only-wasm32-wasip1",
1001-
"only-watchos",
1002-
"only-windows",
1003-
"only-windows-gnu",
1004-
"only-windows-msvc",
1005-
"only-x86",
1006-
"only-x86_64",
1007-
"only-x86_64-apple-darwin",
1008-
"only-x86_64-fortanix-unknown-sgx",
1009-
"only-x86_64-pc-windows-gnu",
1010-
"only-x86_64-pc-windows-msvc",
1011-
"only-x86_64-unknown-linux-gnu",
1012-
"pp-exact",
1013-
"pretty-compare-only",
1014-
"pretty-mode",
1015-
"proc-macro",
1016-
"reference",
1017-
"regex-error-pattern",
1018-
"remap-src-base",
1019-
"revisions",
1020-
"run-crash",
1021-
"run-fail",
1022-
"run-fail-or-crash",
1023-
"run-flags",
1024-
"run-pass",
1025-
"run-rustfix",
1026-
"rustc-env",
1027-
"rustfix-only-machine-applicable",
1028-
"should-fail",
1029-
"should-ice",
1030-
"stderr-per-bitwidth",
1031-
"test-mir-pass",
1032-
"unique-doc-out-dir",
1033-
"unset-exec-env",
1034-
"unset-rustc-env",
1035-
// Used by the tidy check `unknown_revision`.
1036-
"unused-revision-names",
1037-
// tidy-alphabetical-end
1038-
];
1039-
1040-
const KNOWN_HTMLDOCCK_DIRECTIVE_NAMES: &[&str] = &[
1041-
"count",
1042-
"!count",
1043-
"files",
1044-
"!files",
1045-
"has",
1046-
"!has",
1047-
"has-dir",
1048-
"!has-dir",
1049-
"hasraw",
1050-
"!hasraw",
1051-
"matches",
1052-
"!matches",
1053-
"matchesraw",
1054-
"!matchesraw",
1055-
"snapshot",
1056-
"!snapshot",
1057-
];
1058-
1059-
const KNOWN_JSONDOCCK_DIRECTIVE_NAMES: &[&str] =
1060-
&["count", "!count", "has", "!has", "is", "!is", "ismany", "!ismany", "set", "!set"];
1061-
1062776
/// The (partly) broken-down contents of a line containing a test directive,
1063777
/// which [`iter_directives`] passes to its callback function.
1064778
///

0 commit comments

Comments
 (0)