diff --git a/src/tools/compiletest/src/header.rs b/src/tools/compiletest/src/header.rs index 44e5d8dea7dc..c76cba824a37 100644 --- a/src/tools/compiletest/src/header.rs +++ b/src/tools/compiletest/src/header.rs @@ -673,14 +673,17 @@ pub fn line_directive<'line>( /// names. This is **not** an exhaustive list of all possible directives. Instead, this is a /// best-effort approximation for diagnostics. const DIAGNOSTICS_DIRECTIVE_NAMES: &[&str] = &[ + "assembly-output", "aux-build", "aux-crate", + "build-aux-docs", "build-fail", "build-pass", "check-fail", "check-pass", "check-run-results", "check-stdout", + "check-test-line-numbers-match", "compile-flags", "dont-check-compiler-stderr", "dont-check-compiler-stdout", @@ -691,12 +694,16 @@ const DIAGNOSTICS_DIRECTIVE_NAMES: &[&str] = &[ "failure-status", "forbid-output", "force-host", + "ignore-16bit", "ignore-32bit", "ignore-64bit", "ignore-aarch64", "ignore-aarch64-unknown-linux-gnu", "ignore-android", "ignore-arm", + "ignore-avr", + "ignore-beta", + "ignore-cdb", "ignore-compare-mode-next-solver", "ignore-compare-mode-polonius", "ignore-cross-compile", @@ -705,13 +712,21 @@ const DIAGNOSTICS_DIRECTIVE_NAMES: &[&str] = &[ "ignore-endian-big", "ignore-freebsd", "ignore-fuchsia", + "ignore-gdb", + "ignore-gdb-version", "ignore-gnu", "ignore-haiku", "ignore-horizon", "ignore-i686-pc-windows-msvc", "ignore-ios", + "ignore-linux", + "ignore-lldb", "ignore-llvm-version", + "ignore-loongarch64", "ignore-macos", + "ignore-mode-coverage-map", + "ignore-mode-coverage-run", + "ignore-msp430", "ignore-msvc", "ignore-musl", "ignore-netbsd", @@ -720,8 +735,13 @@ const DIAGNOSTICS_DIRECTIVE_NAMES: &[&str] = &[ "ignore-nvptx64", "ignore-openbsd", "ignore-pass", + "ignore-remote", + "ignore-riscv64", + "ignore-s390x", "ignore-sgx", "ignore-spirv", + "ignore-stable", + "ignore-stage1", "ignore-test", "ignore-thumbv8m.base-none-eabi", "ignore-thumbv8m.main-none-eabi", @@ -731,9 +751,15 @@ const DIAGNOSTICS_DIRECTIVE_NAMES: &[&str] = &[ "ignore-wasm32", "ignore-wasm32-bare", "ignore-windows", + "ignore-windows-gnu", "ignore-x86", + "ignore-x86_64-apple-darwin", "incremental", "known-bug", + "llvm-cov-flags", + "min-cdb-version", + "min-gdb-version", + "min-lldb-version", "min-llvm-version", "needs-asm-support", "needs-dlltool", @@ -742,11 +768,15 @@ const DIAGNOSTICS_DIRECTIVE_NAMES: &[&str] = &[ "needs-profiler-support", "needs-relocation-model-pic", "needs-run-enabled", + "needs-rust-lldb", "needs-sanitizer-address", "needs-sanitizer-cfi", "needs-sanitizer-hwaddress", "needs-sanitizer-leak", "needs-sanitizer-memory", + "needs-sanitizer-memtag", + "needs-sanitizer-safestack", + "needs-sanitizer-shadow-call-stack", "needs-sanitizer-support", "needs-sanitizer-thread", "needs-unwind", @@ -756,23 +786,42 @@ const DIAGNOSTICS_DIRECTIVE_NAMES: &[&str] = &[ "normalize-stderr-64bit", "normalize-stderr-test", "normalize-stdout-test", + "only-16bit", "only-32bit", "only-64bit", "only-aarch64", + "only-arm", + "only-avr", + "only-bpf", + "only-cdb", "only-gnu", "only-i686-pc-windows-msvc", "only-linux", + "only-loongarch64", + "only-loongarch64-unknown-linux-gnu", "only-macos", + "only-mips", + "only-mips64", + "only-msp430", "only-msvc", "only-nightly", + "only-nvptx64", + "only-riscv64", + "only-sparc", + "only-sparc64", + "only-thumb", "only-wasm32", + "only-wasm32-bare", "only-windows", "only-x86", "only-x86_64", + "only-x86_64-fortanix-unknown-sgx", "only-x86_64-pc-windows-msvc", "only-x86_64-unknown-linux-gnu", "pp-exact", + "pretty-compare-only", "pretty-expanded", + "pretty-mode", "regex-error-pattern", "remap-src-base", "revisions", @@ -783,7 +832,10 @@ const DIAGNOSTICS_DIRECTIVE_NAMES: &[&str] = &[ "rustc-env", "rustfix-only-machine-applicable", "should-fail", + "should-ice", "stderr-per-bitwidth", + "unit-test", + "unset-exec-env", "unset-rustc-env", ]; @@ -817,7 +869,7 @@ struct HeaderLine<'ln> { fn iter_header( mode: Mode, - suite: &str, + _suite: &str, poisoned: &mut bool, testfile: &Path, rdr: impl Read, @@ -848,11 +900,7 @@ fn iter_header( } } - let comment = if testfile.extension().is_some_and(|e| e == "rs") { - if mode == Mode::Ui && suite == "ui" { "//@" } else { "//" } - } else { - "#" - }; + let comment = if testfile.extension().is_some_and(|e| e == "rs") { "//@" } else { "#" }; let mut rdr = BufReader::with_capacity(1024, rdr); let mut ln = String::new(); @@ -879,7 +927,7 @@ fn iter_header( // First try to accept `ui_test` style comments } else if let Some((header_revision, directive)) = line_directive(comment, ln) { it(HeaderLine { line_number, original_line, header_revision, directive }); - } else if mode == Mode::Ui && suite == "ui" && !REVISION_MAGIC_COMMENT_RE.is_match(ln) { + } else if !REVISION_MAGIC_COMMENT_RE.is_match(ln) { let Some((_, rest)) = line_directive("//", ln) else { continue; }; @@ -899,7 +947,7 @@ fn iter_header( // directive. We emit an error here to warn the user. *poisoned = true; eprintln!( - "error: detected legacy-style directives in ui test: {}:{}, please use `ui_test`-style directives `//@` instead:{:#?}", + "error: detected legacy-style directives in compiletest test: {}:{}, please use `ui_test`-style directives `//@` instead:{:#?}", testfile.display(), line_number, line_directive("//", ln), @@ -912,7 +960,7 @@ fn iter_header( // directive. We emit an error here to warn the user. *poisoned = true; eprintln!( - "error: detected legacy-style directives in ui test: {}:{}, please use `ui_test`-style directives `//@` instead:{:#?}", + "error: detected legacy-style directives in compiletest test: {}:{}, please use `ui_test`-style directives `//@` instead:{:#?}", testfile.display(), line_number, line_directive("//", ln), @@ -1213,11 +1261,8 @@ pub fn make_test_description( if let Some((_, post)) = original_line.trim_start().split_once("//") { let post = post.trim_start(); - if post.starts_with("ignore-tidy") - && config.mode == Mode::Ui - && config.suite == "ui" - { - // not handled by compiletest under the ui test mode and ui test suite. + if post.starts_with("ignore-tidy") { + // Not handled by compiletest. } else { decision!(cfg::handle_ignore(config, ln)); } diff --git a/src/tools/compiletest/src/header/tests.rs b/src/tools/compiletest/src/header/tests.rs index f76fb406cea2..a01f71a68763 100644 --- a/src/tools/compiletest/src/header/tests.rs +++ b/src/tools/compiletest/src/header/tests.rs @@ -578,12 +578,7 @@ fn ignore_mode() { assert_eq!(config.mode, Mode::from_str(mode).unwrap()); assert_ne!(config.mode, Mode::from_str(other).unwrap()); - if mode == "ui" { - assert!(check_ignore(&config, &format!("//@ ignore-mode-{mode}"))); - assert!(!check_ignore(&config, &format!("//@ ignore-mode-{other}"))); - } else { - assert!(check_ignore(&config, &format!("// ignore-mode-{mode}"))); - assert!(!check_ignore(&config, &format!("// ignore-mode-{other}"))); - } + assert!(check_ignore(&config, &format!("//@ ignore-mode-{mode}"))); + assert!(!check_ignore(&config, &format!("//@ ignore-mode-{other}"))); } } diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index f3e2a940f36c..27a8079d893f 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -3938,15 +3938,10 @@ impl<'test> TestCx<'test> { self.props.compare_output_lines_by_subset, ); } else if !expected_fixed.is_empty() { - if self.config.suite == "ui" { - panic!( - "the `//@ run-rustfix` directive wasn't found but a `*.fixed` file was found" - ); - } else { - panic!( - "the `// run-rustfix` directive wasn't found but a `*.fixed` file was found" - ); - } + panic!( + "the `//@ run-rustfix` directive wasn't found but a `*.fixed` \ + file was found" + ); } if errors > 0 { diff --git a/src/tools/tidy/src/target_policy.rs b/src/tools/tidy/src/target_policy.rs index ca6590d1502a..382488e57211 100644 --- a/src/tools/tidy/src/target_policy.rs +++ b/src/tools/tidy/src/target_policy.rs @@ -7,7 +7,7 @@ use std::{collections::HashSet, path::Path}; const TARGET_DEFINITIONS_PATH: &str = "compiler/rustc_target/src/spec/targets/"; const ASSEMBLY_TEST_PATH: &str = "tests/assembly/targets/"; -const REVISION_LINE_START: &str = "// revisions: "; +const REVISION_LINE_START: &str = "//@ revisions: "; const EXCEPTIONS: &[&str] = &[ // FIXME: disabled since it fails on CI saying the csky component is missing "csky_unknown_linux_gnuabiv2", diff --git a/src/tools/tidy/src/target_specific_tests.rs b/src/tools/tidy/src/target_specific_tests.rs index de022be28948..c6136a18bd8c 100644 --- a/src/tools/tidy/src/target_specific_tests.rs +++ b/src/tools/tidy/src/target_specific_tests.rs @@ -6,7 +6,7 @@ use std::path::Path; use crate::walk::filter_not_rust; -const COMMENT: &str = "//"; +const COMMENT: &str = "//@"; const LLVM_COMPONENTS_HEADER: &str = "needs-llvm-components:"; const COMPILE_FLAGS_HEADER: &str = "compile-flags:"; diff --git a/tests/assembly/aarch64-naked-fn-no-bti-prolog.rs b/tests/assembly/aarch64-naked-fn-no-bti-prolog.rs index 79b0bb2d7eea..8ee6f6792e94 100644 --- a/tests/assembly/aarch64-naked-fn-no-bti-prolog.rs +++ b/tests/assembly/aarch64-naked-fn-no-bti-prolog.rs @@ -1,7 +1,7 @@ -// compile-flags: -C no-prepopulate-passes -Zbranch-protection=bti -// assembly-output: emit-asm -// needs-asm-support -// only-aarch64 +//@ compile-flags: -C no-prepopulate-passes -Zbranch-protection=bti +//@ assembly-output: emit-asm +//@ needs-asm-support +//@ only-aarch64 #![crate_type = "lib"] #![feature(naked_functions)] diff --git a/tests/assembly/aarch64-pointer-auth.rs b/tests/assembly/aarch64-pointer-auth.rs index da14cd026780..1e53878a2ccb 100644 --- a/tests/assembly/aarch64-pointer-auth.rs +++ b/tests/assembly/aarch64-pointer-auth.rs @@ -1,9 +1,9 @@ // Test that PAC instructions are emitted when branch-protection is specified. -// assembly-output: emit-asm -// compile-flags: --target aarch64-unknown-linux-gnu -// compile-flags: -Z branch-protection=pac-ret,leaf -// needs-llvm-components: aarch64 +//@ assembly-output: emit-asm +//@ compile-flags: --target aarch64-unknown-linux-gnu +//@ compile-flags: -Z branch-protection=pac-ret,leaf +//@ needs-llvm-components: aarch64 #![feature(no_core, lang_items)] #![no_std] diff --git a/tests/assembly/align_offset.rs b/tests/assembly/align_offset.rs index 116edf62bbed..dbf599a741fd 100644 --- a/tests/assembly/align_offset.rs +++ b/tests/assembly/align_offset.rs @@ -1,6 +1,6 @@ -// assembly-output: emit-asm -// compile-flags: -Copt-level=1 -// only-x86_64 +//@ assembly-output: emit-asm +//@ compile-flags: -Copt-level=1 +//@ only-x86_64 #![crate_type="rlib"] // CHECK-LABEL: align_offset_byte_ptr diff --git a/tests/assembly/asm/aarch64-el2vmsa.rs b/tests/assembly/asm/aarch64-el2vmsa.rs index 1908ffb8ff3f..c217f008c070 100644 --- a/tests/assembly/asm/aarch64-el2vmsa.rs +++ b/tests/assembly/asm/aarch64-el2vmsa.rs @@ -1,6 +1,6 @@ -// assembly-output: emit-asm -// compile-flags: --target aarch64-unknown-linux-gnu -// needs-llvm-components: aarch64 +//@ assembly-output: emit-asm +//@ compile-flags: --target aarch64-unknown-linux-gnu +//@ needs-llvm-components: aarch64 #![feature(no_core, lang_items, rustc_attrs)] #![crate_type = "rlib"] diff --git a/tests/assembly/asm/aarch64-modifiers.rs b/tests/assembly/asm/aarch64-modifiers.rs index 5196aa9fa175..ffba06ae47bb 100644 --- a/tests/assembly/asm/aarch64-modifiers.rs +++ b/tests/assembly/asm/aarch64-modifiers.rs @@ -1,7 +1,7 @@ -// assembly-output: emit-asm -// compile-flags: -O -// compile-flags: --target aarch64-unknown-linux-gnu -// needs-llvm-components: aarch64 +//@ assembly-output: emit-asm +//@ compile-flags: -O +//@ compile-flags: --target aarch64-unknown-linux-gnu +//@ needs-llvm-components: aarch64 #![feature(no_core, lang_items, rustc_attrs)] #![crate_type = "rlib"] diff --git a/tests/assembly/asm/aarch64-outline-atomics.rs b/tests/assembly/asm/aarch64-outline-atomics.rs index c2ec4e911b9d..bcf0964b722a 100644 --- a/tests/assembly/asm/aarch64-outline-atomics.rs +++ b/tests/assembly/asm/aarch64-outline-atomics.rs @@ -1,9 +1,9 @@ -// assembly-output: emit-asm -// compile-flags: -O -// compile-flags: --target aarch64-unknown-linux-gnu -// needs-llvm-components: aarch64 -// only-aarch64 -// only-linux +//@ assembly-output: emit-asm +//@ compile-flags: -O +//@ compile-flags: --target aarch64-unknown-linux-gnu +//@ needs-llvm-components: aarch64 +//@ only-aarch64 +//@ only-linux #![crate_type = "rlib"] diff --git a/tests/assembly/asm/aarch64-types.rs b/tests/assembly/asm/aarch64-types.rs index 66c39a48c6e1..1b2bd4b3d81f 100644 --- a/tests/assembly/asm/aarch64-types.rs +++ b/tests/assembly/asm/aarch64-types.rs @@ -1,6 +1,6 @@ -// assembly-output: emit-asm -// compile-flags: --target aarch64-unknown-linux-gnu -// needs-llvm-components: aarch64 +//@ assembly-output: emit-asm +//@ compile-flags: --target aarch64-unknown-linux-gnu +//@ needs-llvm-components: aarch64 #![feature(no_core, lang_items, rustc_attrs, repr_simd)] #![crate_type = "rlib"] diff --git a/tests/assembly/asm/arm-modifiers.rs b/tests/assembly/asm/arm-modifiers.rs index 88ffeaecfecb..fa2e75eb35b0 100644 --- a/tests/assembly/asm/arm-modifiers.rs +++ b/tests/assembly/asm/arm-modifiers.rs @@ -1,8 +1,8 @@ -// assembly-output: emit-asm -// compile-flags: -O -// compile-flags: --target armv7-unknown-linux-gnueabihf -// compile-flags: -C target-feature=+neon -// needs-llvm-components: arm +//@ assembly-output: emit-asm +//@ compile-flags: -O +//@ compile-flags: --target armv7-unknown-linux-gnueabihf +//@ compile-flags: -C target-feature=+neon +//@ needs-llvm-components: arm #![feature(no_core, lang_items, rustc_attrs, repr_simd)] #![crate_type = "rlib"] diff --git a/tests/assembly/asm/arm-types.rs b/tests/assembly/asm/arm-types.rs index 9520f9327797..280b6d4a2280 100644 --- a/tests/assembly/asm/arm-types.rs +++ b/tests/assembly/asm/arm-types.rs @@ -1,8 +1,8 @@ -// assembly-output: emit-asm -// compile-flags: --target armv7-unknown-linux-gnueabihf -// compile-flags: -C target-feature=+neon -// compile-flags: -C opt-level=0 -// needs-llvm-components: arm +//@ assembly-output: emit-asm +//@ compile-flags: --target armv7-unknown-linux-gnueabihf +//@ compile-flags: -C target-feature=+neon +//@ compile-flags: -C opt-level=0 +//@ needs-llvm-components: arm #![feature(no_core, lang_items, rustc_attrs, repr_simd)] #![crate_type = "rlib"] diff --git a/tests/assembly/asm/avr-modifiers.rs b/tests/assembly/asm/avr-modifiers.rs index ffdc8f2e351d..e94375f95969 100644 --- a/tests/assembly/asm/avr-modifiers.rs +++ b/tests/assembly/asm/avr-modifiers.rs @@ -1,6 +1,6 @@ -// assembly-output: emit-asm -// compile-flags: --target avr-unknown-gnu-atmega328 -// needs-llvm-components: avr +//@ assembly-output: emit-asm +//@ compile-flags: --target avr-unknown-gnu-atmega328 +//@ needs-llvm-components: avr #![feature(no_core, lang_items, rustc_attrs, asm_experimental_arch)] #![crate_type = "rlib"] diff --git a/tests/assembly/asm/avr-types.rs b/tests/assembly/asm/avr-types.rs index b2d11a8826f6..88b16895e8dc 100644 --- a/tests/assembly/asm/avr-types.rs +++ b/tests/assembly/asm/avr-types.rs @@ -1,6 +1,6 @@ -// assembly-output: emit-asm -// compile-flags: --target avr-unknown-gnu-atmega328 -// needs-llvm-components: avr +//@ assembly-output: emit-asm +//@ compile-flags: --target avr-unknown-gnu-atmega328 +//@ needs-llvm-components: avr #![feature(no_core, lang_items, rustc_attrs, asm_experimental_arch)] #![crate_type = "rlib"] diff --git a/tests/assembly/asm/bpf-types.rs b/tests/assembly/asm/bpf-types.rs index e177b8d0dbe5..0a9ec7dd52ba 100644 --- a/tests/assembly/asm/bpf-types.rs +++ b/tests/assembly/asm/bpf-types.rs @@ -1,6 +1,6 @@ -// assembly-output: emit-asm -// compile-flags: --target bpfel-unknown-none -C target_feature=+alu32 -// needs-llvm-components: bpf +//@ assembly-output: emit-asm +//@ compile-flags: --target bpfel-unknown-none -C target_feature=+alu32 +//@ needs-llvm-components: bpf #![feature(no_core, lang_items, rustc_attrs, repr_simd, asm_experimental_arch)] #![crate_type = "rlib"] diff --git a/tests/assembly/asm/global_asm.rs b/tests/assembly/asm/global_asm.rs index 36f017cf9d60..8f824563e8ae 100644 --- a/tests/assembly/asm/global_asm.rs +++ b/tests/assembly/asm/global_asm.rs @@ -1,8 +1,8 @@ -// only-x86_64 -// only-linux -// assembly-output: emit-asm -// compile-flags: -C llvm-args=--x86-asm-syntax=intel -// compile-flags: -C symbol-mangling-version=v0 +//@ only-x86_64 +//@ only-linux +//@ assembly-output: emit-asm +//@ compile-flags: -C llvm-args=--x86-asm-syntax=intel +//@ compile-flags: -C symbol-mangling-version=v0 #![feature(asm_const)] #![crate_type = "rlib"] diff --git a/tests/assembly/asm/hexagon-types.rs b/tests/assembly/asm/hexagon-types.rs index af16faedbc4a..269c7582a1ce 100644 --- a/tests/assembly/asm/hexagon-types.rs +++ b/tests/assembly/asm/hexagon-types.rs @@ -1,6 +1,6 @@ -// assembly-output: emit-asm -// compile-flags: --target hexagon-unknown-linux-musl -// needs-llvm-components: hexagon +//@ assembly-output: emit-asm +//@ compile-flags: --target hexagon-unknown-linux-musl +//@ needs-llvm-components: hexagon #![feature(no_core, lang_items, rustc_attrs, repr_simd, asm_experimental_arch)] #![crate_type = "rlib"] diff --git a/tests/assembly/asm/inline-asm-avx.rs b/tests/assembly/asm/inline-asm-avx.rs index c2875f3e0a44..7e52a798dedb 100644 --- a/tests/assembly/asm/inline-asm-avx.rs +++ b/tests/assembly/asm/inline-asm-avx.rs @@ -1,7 +1,7 @@ -// assembly-output: emit-asm -// compile-flags: --crate-type=lib -// only-x86_64 -// ignore-sgx +//@ assembly-output: emit-asm +//@ compile-flags: --crate-type=lib +//@ only-x86_64 +//@ ignore-sgx #![feature(portable_simd)] diff --git a/tests/assembly/asm/loongarch-type.rs b/tests/assembly/asm/loongarch-type.rs index 4aeecf92d865..e4c46cfcf81b 100644 --- a/tests/assembly/asm/loongarch-type.rs +++ b/tests/assembly/asm/loongarch-type.rs @@ -1,6 +1,6 @@ -// assembly-output: emit-asm -// compile-flags: --target loongarch64-unknown-linux-gnu -// needs-llvm-components: loongarch +//@ assembly-output: emit-asm +//@ compile-flags: --target loongarch64-unknown-linux-gnu +//@ needs-llvm-components: loongarch #![feature(no_core, lang_items, rustc_attrs, asm_experimental_arch)] #![crate_type = "rlib"] diff --git a/tests/assembly/asm/m68k-types.rs b/tests/assembly/asm/m68k-types.rs index 0322e615a197..b3e86b709c3d 100644 --- a/tests/assembly/asm/m68k-types.rs +++ b/tests/assembly/asm/m68k-types.rs @@ -1,6 +1,6 @@ -// assembly-output: emit-asm -// compile-flags: --target m68k-unknown-linux-gnu -// needs-llvm-components: m68k +//@ assembly-output: emit-asm +//@ compile-flags: --target m68k-unknown-linux-gnu +//@ needs-llvm-components: m68k #![feature(no_core, lang_items, rustc_attrs, asm_experimental_arch)] #![crate_type = "rlib"] diff --git a/tests/assembly/asm/mips-types.rs b/tests/assembly/asm/mips-types.rs index 27469b22980a..bd62f4a5236c 100644 --- a/tests/assembly/asm/mips-types.rs +++ b/tests/assembly/asm/mips-types.rs @@ -1,9 +1,9 @@ -// revisions: mips32 mips64 -// assembly-output: emit-asm -//[mips32] compile-flags: --target mips-unknown-linux-gnu -//[mips32] needs-llvm-components: mips -//[mips64] compile-flags: --target mips64-unknown-linux-gnuabi64 -//[mips64] needs-llvm-components: mips +//@ revisions: mips32 mips64 +//@ assembly-output: emit-asm +//@[mips32] compile-flags: --target mips-unknown-linux-gnu +//@[mips32] needs-llvm-components: mips +//@[mips64] compile-flags: --target mips64-unknown-linux-gnuabi64 +//@[mips64] needs-llvm-components: mips #![feature(no_core, lang_items, rustc_attrs, repr_simd, asm_experimental_arch)] #![crate_type = "rlib"] diff --git a/tests/assembly/asm/msp430-types.rs b/tests/assembly/asm/msp430-types.rs index 2c73b3b098de..4f51d4020a66 100644 --- a/tests/assembly/asm/msp430-types.rs +++ b/tests/assembly/asm/msp430-types.rs @@ -1,6 +1,6 @@ -// assembly-output: emit-asm -// compile-flags: --target msp430-none-elf -// needs-llvm-components: msp430 +//@ assembly-output: emit-asm +//@ compile-flags: --target msp430-none-elf +//@ needs-llvm-components: msp430 #![feature(no_core, lang_items, rustc_attrs, asm_experimental_arch, asm_const)] #![crate_type = "rlib"] diff --git a/tests/assembly/asm/nvptx-types.rs b/tests/assembly/asm/nvptx-types.rs index c319946b5f5c..0dd3162b4c02 100644 --- a/tests/assembly/asm/nvptx-types.rs +++ b/tests/assembly/asm/nvptx-types.rs @@ -1,7 +1,7 @@ -// assembly-output: emit-asm -// compile-flags: --target nvptx64-nvidia-cuda -// compile-flags: --crate-type cdylib -// needs-llvm-components: nvptx +//@ assembly-output: emit-asm +//@ compile-flags: --target nvptx64-nvidia-cuda +//@ compile-flags: --crate-type cdylib +//@ needs-llvm-components: nvptx #![feature(no_core, lang_items, rustc_attrs, asm_experimental_arch)] #![no_core] diff --git a/tests/assembly/asm/powerpc-types.rs b/tests/assembly/asm/powerpc-types.rs index e27b00520683..bc8af08ad113 100644 --- a/tests/assembly/asm/powerpc-types.rs +++ b/tests/assembly/asm/powerpc-types.rs @@ -1,9 +1,9 @@ -// revisions: powerpc powerpc64 -// assembly-output: emit-asm -//[powerpc] compile-flags: --target powerpc-unknown-linux-gnu -//[powerpc] needs-llvm-components: powerpc -//[powerpc64] compile-flags: --target powerpc64-unknown-linux-gnu -//[powerpc64] needs-llvm-components: powerpc +//@ revisions: powerpc powerpc64 +//@ assembly-output: emit-asm +//@[powerpc] compile-flags: --target powerpc-unknown-linux-gnu +//@[powerpc] needs-llvm-components: powerpc +//@[powerpc64] compile-flags: --target powerpc64-unknown-linux-gnu +//@[powerpc64] needs-llvm-components: powerpc #![feature(no_core, lang_items, rustc_attrs, repr_simd, asm_experimental_arch)] #![crate_type = "rlib"] diff --git a/tests/assembly/asm/riscv-types.rs b/tests/assembly/asm/riscv-types.rs index f18ba294d0cf..0d1f8305d375 100644 --- a/tests/assembly/asm/riscv-types.rs +++ b/tests/assembly/asm/riscv-types.rs @@ -1,10 +1,10 @@ -// revisions: riscv64 riscv32 -// assembly-output: emit-asm -//[riscv64] compile-flags: --target riscv64imac-unknown-none-elf -//[riscv64] needs-llvm-components: riscv -//[riscv32] compile-flags: --target riscv32imac-unknown-none-elf -//[riscv32] needs-llvm-components: riscv -// compile-flags: -C target-feature=+d +//@ revisions: riscv64 riscv32 +//@ assembly-output: emit-asm +//@[riscv64] compile-flags: --target riscv64imac-unknown-none-elf +//@[riscv64] needs-llvm-components: riscv +//@[riscv32] compile-flags: --target riscv32imac-unknown-none-elf +//@[riscv32] needs-llvm-components: riscv +//@ compile-flags: -C target-feature=+d #![feature(no_core, lang_items, rustc_attrs)] #![crate_type = "rlib"] diff --git a/tests/assembly/asm/s390x-types.rs b/tests/assembly/asm/s390x-types.rs index c39a82c3b1c4..661907360bd2 100644 --- a/tests/assembly/asm/s390x-types.rs +++ b/tests/assembly/asm/s390x-types.rs @@ -1,7 +1,7 @@ -// revisions: s390x -// assembly-output: emit-asm -//[s390x] compile-flags: --target s390x-unknown-linux-gnu -//[s390x] needs-llvm-components: systemz +//@ revisions: s390x +//@ assembly-output: emit-asm +//@[s390x] compile-flags: --target s390x-unknown-linux-gnu +//@[s390x] needs-llvm-components: systemz #![feature(no_core, lang_items, rustc_attrs, repr_simd, asm_experimental_arch)] #![crate_type = "rlib"] diff --git a/tests/assembly/asm/wasm-types.rs b/tests/assembly/asm/wasm-types.rs index 3b1ac1b455ad..fe5ce836bc6e 100644 --- a/tests/assembly/asm/wasm-types.rs +++ b/tests/assembly/asm/wasm-types.rs @@ -1,7 +1,7 @@ -// assembly-output: emit-asm -// compile-flags: --target wasm32-unknown-unknown -// compile-flags: --crate-type cdylib -// needs-llvm-components: webassembly +//@ assembly-output: emit-asm +//@ compile-flags: --target wasm32-unknown-unknown +//@ compile-flags: --crate-type cdylib +//@ needs-llvm-components: webassembly #![feature(no_core, lang_items, rustc_attrs, asm_experimental_arch)] #![no_core] diff --git a/tests/assembly/asm/x86-modifiers.rs b/tests/assembly/asm/x86-modifiers.rs index 574fdf12cd04..1a92585298d9 100644 --- a/tests/assembly/asm/x86-modifiers.rs +++ b/tests/assembly/asm/x86-modifiers.rs @@ -1,12 +1,12 @@ -// revisions: x86_64 i686 -// assembly-output: emit-asm -// compile-flags: -O -//[x86_64] compile-flags: --target x86_64-unknown-linux-gnu -//[x86_64] needs-llvm-components: x86 -//[i686] compile-flags: --target i686-unknown-linux-gnu -//[i686] needs-llvm-components: x86 -// compile-flags: -C llvm-args=--x86-asm-syntax=intel -// compile-flags: -C target-feature=+avx512bw +//@ revisions: x86_64 i686 +//@ assembly-output: emit-asm +//@ compile-flags: -O +//@[x86_64] compile-flags: --target x86_64-unknown-linux-gnu +//@[x86_64] needs-llvm-components: x86 +//@[i686] compile-flags: --target i686-unknown-linux-gnu +//@[i686] needs-llvm-components: x86 +//@ compile-flags: -C llvm-args=--x86-asm-syntax=intel +//@ compile-flags: -C target-feature=+avx512bw #![feature(no_core, lang_items, rustc_attrs)] #![crate_type = "rlib"] diff --git a/tests/assembly/asm/x86-types.rs b/tests/assembly/asm/x86-types.rs index 81be79cbaac1..2b4ebb05349b 100644 --- a/tests/assembly/asm/x86-types.rs +++ b/tests/assembly/asm/x86-types.rs @@ -1,11 +1,11 @@ -// revisions: x86_64 i686 -// assembly-output: emit-asm -//[x86_64] compile-flags: --target x86_64-unknown-linux-gnu -//[x86_64] needs-llvm-components: x86 -//[i686] compile-flags: --target i686-unknown-linux-gnu -//[i686] needs-llvm-components: x86 -// compile-flags: -C llvm-args=--x86-asm-syntax=intel -// compile-flags: -C target-feature=+avx512bw +//@ revisions: x86_64 i686 +//@ assembly-output: emit-asm +//@[x86_64] compile-flags: --target x86_64-unknown-linux-gnu +//@[x86_64] needs-llvm-components: x86 +//@[i686] compile-flags: --target i686-unknown-linux-gnu +//@[i686] needs-llvm-components: x86 +//@ compile-flags: -C llvm-args=--x86-asm-syntax=intel +//@ compile-flags: -C target-feature=+avx512bw #![feature(no_core, lang_items, rustc_attrs, repr_simd)] #![crate_type = "rlib"] diff --git a/tests/assembly/closure-inherit-target-feature.rs b/tests/assembly/closure-inherit-target-feature.rs index 7acda76e25f0..cafe9e7ca6fa 100644 --- a/tests/assembly/closure-inherit-target-feature.rs +++ b/tests/assembly/closure-inherit-target-feature.rs @@ -1,8 +1,8 @@ -// only-x86_64 -// ignore-sgx Tests incompatible with LVI mitigations -// assembly-output: emit-asm +//@ only-x86_64 +//@ ignore-sgx Tests incompatible with LVI mitigations +//@ assembly-output: emit-asm // make sure the feature is not enabled at compile-time -// compile-flags: -C opt-level=3 -C target-feature=-sse4.1 -C llvm-args=-x86-asm-syntax=intel +//@ compile-flags: -C opt-level=3 -C target-feature=-sse4.1 -C llvm-args=-x86-asm-syntax=intel #![feature(target_feature_11)] #![crate_type = "rlib"] diff --git a/tests/assembly/dwarf4.rs b/tests/assembly/dwarf4.rs index 6e1584458b6c..22be8e5603f2 100644 --- a/tests/assembly/dwarf4.rs +++ b/tests/assembly/dwarf4.rs @@ -1,7 +1,7 @@ // Makes sure that `-Z dwarf-version=4` causes `rustc` to emit DWARF version 4. -// assembly-output: emit-asm -// compile-flags: -g --target x86_64-unknown-linux-gnu -Z dwarf-version=4 -Copt-level=0 -// needs-llvm-components: x86 +//@ assembly-output: emit-asm +//@ compile-flags: -g --target x86_64-unknown-linux-gnu -Z dwarf-version=4 -Copt-level=0 +//@ needs-llvm-components: x86 #![feature(no_core, lang_items)] #![crate_type = "rlib"] diff --git a/tests/assembly/dwarf5.rs b/tests/assembly/dwarf5.rs index 46d4e84b41bf..35f2716e9fa9 100644 --- a/tests/assembly/dwarf5.rs +++ b/tests/assembly/dwarf5.rs @@ -1,7 +1,7 @@ // Makes sure that `-Z dwarf-version=5` causes `rustc` to emit DWARF version 5. -// assembly-output: emit-asm -// compile-flags: -g --target x86_64-unknown-linux-gnu -Z dwarf-version=5 -Copt-level=0 -// needs-llvm-components: x86 +//@ assembly-output: emit-asm +//@ compile-flags: -g --target x86_64-unknown-linux-gnu -Z dwarf-version=5 -Copt-level=0 +//@ needs-llvm-components: x86 #![feature(no_core, lang_items)] #![crate_type = "rlib"] diff --git a/tests/assembly/is_aligned.rs b/tests/assembly/is_aligned.rs index c4a7823ce1ad..9d637793f874 100644 --- a/tests/assembly/is_aligned.rs +++ b/tests/assembly/is_aligned.rs @@ -1,9 +1,9 @@ -// assembly-output: emit-asm -// only-x86_64 -// ignore-sgx -// revisions: opt-speed opt-size -// [opt-speed] compile-flags: -Copt-level=2 -Cdebug-assertions=no -// [opt-size] compile-flags: -Copt-level=s -Cdebug-assertions=no +//@ assembly-output: emit-asm +//@ only-x86_64 +//@ ignore-sgx +//@ revisions: opt-speed opt-size +//@ [opt-speed] compile-flags: -Copt-level=2 -Cdebug-assertions=no +//@ [opt-size] compile-flags: -Copt-level=s -Cdebug-assertions=no #![crate_type="rlib"] #![feature(core_intrinsics)] diff --git a/tests/assembly/libs/issue-115339-zip-arrays.rs b/tests/assembly/libs/issue-115339-zip-arrays.rs index 26b7b9770bc8..956459b2c773 100644 --- a/tests/assembly/libs/issue-115339-zip-arrays.rs +++ b/tests/assembly/libs/issue-115339-zip-arrays.rs @@ -1,8 +1,8 @@ -// assembly-output: emit-asm +//@ assembly-output: emit-asm // # zen3 previously exhibited odd vectorization -// compile-flags: --crate-type=lib -Ctarget-cpu=znver3 -O -// only-x86_64 -// ignore-sgx +//@ compile-flags: --crate-type=lib -Ctarget-cpu=znver3 -O +//@ only-x86_64 +//@ ignore-sgx use std::iter; diff --git a/tests/assembly/niche-prefer-zero.rs b/tests/assembly/niche-prefer-zero.rs index 0ab37a618daa..4e260ebc09bc 100644 --- a/tests/assembly/niche-prefer-zero.rs +++ b/tests/assembly/niche-prefer-zero.rs @@ -1,8 +1,8 @@ // Check that niche selection prefers zero and that jumps are optimized away. // See https://github.com/rust-lang/rust/pull/87794 -// assembly-output: emit-asm -// only-x86 -// compile-flags: -Copt-level=3 +//@ assembly-output: emit-asm +//@ only-x86 +//@ compile-flags: -Copt-level=3 #![crate_type = "lib"] diff --git a/tests/assembly/nvptx-arch-default.rs b/tests/assembly/nvptx-arch-default.rs index 8a71a6370f11..bac09574f17c 100644 --- a/tests/assembly/nvptx-arch-default.rs +++ b/tests/assembly/nvptx-arch-default.rs @@ -1,11 +1,11 @@ -// assembly-output: ptx-linker -// compile-flags: --crate-type cdylib -// only-nvptx64 -// ignore-nvptx64 +//@ assembly-output: ptx-linker +//@ compile-flags: --crate-type cdylib +//@ only-nvptx64 +//@ ignore-nvptx64 #![no_std] -// aux-build: breakpoint-panic-handler.rs +//@ aux-build: breakpoint-panic-handler.rs extern crate breakpoint_panic_handler; // Verify default target arch with ptx-linker. diff --git a/tests/assembly/nvptx-arch-emit-asm.rs b/tests/assembly/nvptx-arch-emit-asm.rs index b252b450fa77..d24035cc8314 100644 --- a/tests/assembly/nvptx-arch-emit-asm.rs +++ b/tests/assembly/nvptx-arch-emit-asm.rs @@ -1,7 +1,7 @@ -// assembly-output: emit-asm -// compile-flags: --crate-type rlib -// only-nvptx64 -// ignore-nvptx64 +//@ assembly-output: emit-asm +//@ compile-flags: --crate-type rlib +//@ only-nvptx64 +//@ ignore-nvptx64 #![no_std] diff --git a/tests/assembly/nvptx-arch-link-arg.rs b/tests/assembly/nvptx-arch-link-arg.rs index 025a9ad49877..3432e6161bf1 100644 --- a/tests/assembly/nvptx-arch-link-arg.rs +++ b/tests/assembly/nvptx-arch-link-arg.rs @@ -1,11 +1,11 @@ -// assembly-output: ptx-linker -// compile-flags: --crate-type cdylib -C link-arg=--arch=sm_60 -// only-nvptx64 -// ignore-nvptx64 +//@ assembly-output: ptx-linker +//@ compile-flags: --crate-type cdylib -C link-arg=--arch=sm_60 +//@ only-nvptx64 +//@ ignore-nvptx64 #![no_std] -// aux-build: breakpoint-panic-handler.rs +//@ aux-build: breakpoint-panic-handler.rs extern crate breakpoint_panic_handler; // Verify target arch override via `link-arg`. diff --git a/tests/assembly/nvptx-arch-target-cpu.rs b/tests/assembly/nvptx-arch-target-cpu.rs index 824ee9cd8973..212af20f4dea 100644 --- a/tests/assembly/nvptx-arch-target-cpu.rs +++ b/tests/assembly/nvptx-arch-target-cpu.rs @@ -1,11 +1,11 @@ -// assembly-output: ptx-linker -// compile-flags: --crate-type cdylib -C target-cpu=sm_50 -// only-nvptx64 -// ignore-nvptx64 +//@ assembly-output: ptx-linker +//@ compile-flags: --crate-type cdylib -C target-cpu=sm_50 +//@ only-nvptx64 +//@ ignore-nvptx64 #![no_std] -// aux-build: breakpoint-panic-handler.rs +//@ aux-build: breakpoint-panic-handler.rs extern crate breakpoint_panic_handler; // Verify target arch override via `target-cpu`. diff --git a/tests/assembly/nvptx-atomics.rs b/tests/assembly/nvptx-atomics.rs index f96398064492..52b8c86d8a9c 100644 --- a/tests/assembly/nvptx-atomics.rs +++ b/tests/assembly/nvptx-atomics.rs @@ -1,14 +1,14 @@ -// assembly-output: ptx-linker -// compile-flags: --crate-type cdylib -// only-nvptx64 -// ignore-nvptx64 +//@ assembly-output: ptx-linker +//@ compile-flags: --crate-type cdylib +//@ only-nvptx64 +//@ ignore-nvptx64 #![feature(abi_ptx, core_intrinsics)] #![no_std] use core::intrinsics::*; -// aux-build: breakpoint-panic-handler.rs +//@ aux-build: breakpoint-panic-handler.rs extern crate breakpoint_panic_handler; // Currently, LLVM NVPTX backend can only emit atomic instructions with diff --git a/tests/assembly/nvptx-internalizing.rs b/tests/assembly/nvptx-internalizing.rs index 0004fcea7a20..0acfd5c24431 100644 --- a/tests/assembly/nvptx-internalizing.rs +++ b/tests/assembly/nvptx-internalizing.rs @@ -1,15 +1,15 @@ -// assembly-output: ptx-linker -// compile-flags: --crate-type cdylib -// only-nvptx64 -// ignore-nvptx64 +//@ assembly-output: ptx-linker +//@ compile-flags: --crate-type cdylib +//@ only-nvptx64 +//@ ignore-nvptx64 #![feature(abi_ptx)] #![no_std] -// aux-build: breakpoint-panic-handler.rs +//@ aux-build: breakpoint-panic-handler.rs extern crate breakpoint_panic_handler; -// aux-build: non-inline-dependency.rs +//@ aux-build: non-inline-dependency.rs extern crate non_inline_dependency as dep; // Verify that no extra function declarations are present. diff --git a/tests/assembly/nvptx-kernel-abi/nvptx-kernel-args-abi-v7.rs b/tests/assembly/nvptx-kernel-abi/nvptx-kernel-args-abi-v7.rs index 5bf44f949fdf..a42d5dd3569d 100644 --- a/tests/assembly/nvptx-kernel-abi/nvptx-kernel-args-abi-v7.rs +++ b/tests/assembly/nvptx-kernel-abi/nvptx-kernel-args-abi-v7.rs @@ -1,7 +1,7 @@ -// assembly-output: ptx-linker -// compile-flags: --crate-type cdylib -C target-cpu=sm_86 -// only-nvptx64 -// ignore-nvptx64 +//@ assembly-output: ptx-linker +//@ compile-flags: --crate-type cdylib -C target-cpu=sm_86 +//@ only-nvptx64 +//@ ignore-nvptx64 // The following ABI tests are made with nvcc 11.6 does. // diff --git a/tests/assembly/nvptx-linking-binary.rs b/tests/assembly/nvptx-linking-binary.rs index 64b9c2f17aa7..3b50b472ab10 100644 --- a/tests/assembly/nvptx-linking-binary.rs +++ b/tests/assembly/nvptx-linking-binary.rs @@ -1,16 +1,16 @@ -// assembly-output: ptx-linker -// compile-flags: --crate-type bin -// only-nvptx64 -// ignore-nvptx64 +//@ assembly-output: ptx-linker +//@ compile-flags: --crate-type bin +//@ only-nvptx64 +//@ ignore-nvptx64 #![feature(abi_ptx)] #![no_main] #![no_std] -// aux-build: breakpoint-panic-handler.rs +//@ aux-build: breakpoint-panic-handler.rs extern crate breakpoint_panic_handler; -// aux-build: non-inline-dependency.rs +//@ aux-build: non-inline-dependency.rs extern crate non_inline_dependency as dep; // Make sure declarations are there. diff --git a/tests/assembly/nvptx-linking-cdylib.rs b/tests/assembly/nvptx-linking-cdylib.rs index bdbc30ea97fe..9742e26fb31a 100644 --- a/tests/assembly/nvptx-linking-cdylib.rs +++ b/tests/assembly/nvptx-linking-cdylib.rs @@ -1,15 +1,15 @@ -// assembly-output: ptx-linker -// compile-flags: --crate-type cdylib -// only-nvptx64 -// ignore-nvptx64 +//@ assembly-output: ptx-linker +//@ compile-flags: --crate-type cdylib +//@ only-nvptx64 +//@ ignore-nvptx64 #![feature(abi_ptx)] #![no_std] -// aux-build: breakpoint-panic-handler.rs +//@ aux-build: breakpoint-panic-handler.rs extern crate breakpoint_panic_handler; -// aux-build: non-inline-dependency.rs +//@ aux-build: non-inline-dependency.rs extern crate non_inline_dependency as dep; // Make sure declarations are there. diff --git a/tests/assembly/nvptx-safe-naming.rs b/tests/assembly/nvptx-safe-naming.rs index 80bb04fc0f2f..59fd527be3c7 100644 --- a/tests/assembly/nvptx-safe-naming.rs +++ b/tests/assembly/nvptx-safe-naming.rs @@ -1,12 +1,12 @@ -// assembly-output: ptx-linker -// compile-flags: --crate-type cdylib -// only-nvptx64 -// ignore-nvptx64 +//@ assembly-output: ptx-linker +//@ compile-flags: --crate-type cdylib +//@ only-nvptx64 +//@ ignore-nvptx64 #![feature(abi_ptx)] #![no_std] -// aux-build: breakpoint-panic-handler.rs +//@ aux-build: breakpoint-panic-handler.rs extern crate breakpoint_panic_handler; // Verify function name doesn't contain unacceaptable characters. diff --git a/tests/assembly/option-nonzero-eq.rs b/tests/assembly/option-nonzero-eq.rs index f5d88de76ddf..d6ec586d938b 100644 --- a/tests/assembly/option-nonzero-eq.rs +++ b/tests/assembly/option-nonzero-eq.rs @@ -1,11 +1,11 @@ -// revisions: WIN LIN -// [WIN] only-windows -// [LIN] only-linux -// assembly-output: emit-asm -// compile-flags: --crate-type=lib -O -C llvm-args=-x86-asm-syntax=intel -// only-x86_64 -// ignore-sgx -// ignore-debug +//@ revisions: WIN LIN +//@ [WIN] only-windows +//@ [LIN] only-linux +//@ assembly-output: emit-asm +//@ compile-flags: --crate-type=lib -O -C llvm-args=-x86-asm-syntax=intel +//@ only-x86_64 +//@ ignore-sgx +//@ ignore-debug use std::cmp::Ordering; diff --git a/tests/assembly/panic-no-unwind-no-uwtable.rs b/tests/assembly/panic-no-unwind-no-uwtable.rs index 499d4e698671..24626280155a 100644 --- a/tests/assembly/panic-no-unwind-no-uwtable.rs +++ b/tests/assembly/panic-no-unwind-no-uwtable.rs @@ -1,6 +1,6 @@ -// assembly-output: emit-asm -// only-x86_64-unknown-linux-gnu -// compile-flags: -C panic=unwind -C force-unwind-tables=n -O +//@ assembly-output: emit-asm +//@ only-x86_64-unknown-linux-gnu +//@ compile-flags: -C panic=unwind -C force-unwind-tables=n -O #![crate_type = "lib"] diff --git a/tests/assembly/panic-unwind-no-uwtable.rs b/tests/assembly/panic-unwind-no-uwtable.rs index 8eed72b2fca6..181656a89872 100644 --- a/tests/assembly/panic-unwind-no-uwtable.rs +++ b/tests/assembly/panic-unwind-no-uwtable.rs @@ -1,6 +1,6 @@ -// assembly-output: emit-asm -// only-x86_64-unknown-linux-gnu -// compile-flags: -C panic=unwind -C force-unwind-tables=n +//@ assembly-output: emit-asm +//@ only-x86_64-unknown-linux-gnu +//@ compile-flags: -C panic=unwind -C force-unwind-tables=n #![crate_type = "lib"] diff --git a/tests/assembly/pic-relocation-model.rs b/tests/assembly/pic-relocation-model.rs index 72471ffcdb0c..453fd6a70476 100644 --- a/tests/assembly/pic-relocation-model.rs +++ b/tests/assembly/pic-relocation-model.rs @@ -1,7 +1,7 @@ -// revisions: x64 -// assembly-output: emit-asm -// [x64] compile-flags: --target x86_64-unknown-linux-gnu -Crelocation-model=pic -// [x64] needs-llvm-components: x86 +//@ revisions: x64 +//@ assembly-output: emit-asm +//@ [x64] compile-flags: --target x86_64-unknown-linux-gnu -Crelocation-model=pic +//@ [x64] needs-llvm-components: x86 #![feature(no_core, lang_items)] diff --git a/tests/assembly/pie-relocation-model.rs b/tests/assembly/pie-relocation-model.rs index e40797e038d4..6ff6b7708bbf 100644 --- a/tests/assembly/pie-relocation-model.rs +++ b/tests/assembly/pie-relocation-model.rs @@ -1,7 +1,7 @@ -// revisions: x64 -// assembly-output: emit-asm -// [x64] compile-flags: --target x86_64-unknown-linux-gnu -Crelocation-model=pie -// [x64] needs-llvm-components: x86 +//@ revisions: x64 +//@ assembly-output: emit-asm +//@ [x64] compile-flags: --target x86_64-unknown-linux-gnu -Crelocation-model=pie +//@ [x64] needs-llvm-components: x86 #![feature(no_core, lang_items)] diff --git a/tests/assembly/slice-is_ascii.rs b/tests/assembly/slice-is_ascii.rs index 124121164674..0b7643952149 100644 --- a/tests/assembly/slice-is_ascii.rs +++ b/tests/assembly/slice-is_ascii.rs @@ -1,11 +1,11 @@ -// revisions: WIN LIN -// [WIN] only-windows -// [LIN] only-linux -// assembly-output: emit-asm -// compile-flags: --crate-type=lib -O -C llvm-args=-x86-asm-syntax=intel -// only-x86_64 -// ignore-sgx -// ignore-debug +//@ revisions: WIN LIN +//@ [WIN] only-windows +//@ [LIN] only-linux +//@ assembly-output: emit-asm +//@ compile-flags: --crate-type=lib -O -C llvm-args=-x86-asm-syntax=intel +//@ only-x86_64 +//@ ignore-sgx +//@ ignore-debug #![feature(str_internals)] diff --git a/tests/assembly/sparc-struct-abi.rs b/tests/assembly/sparc-struct-abi.rs index 6309dd420ffa..3a254f179641 100644 --- a/tests/assembly/sparc-struct-abi.rs +++ b/tests/assembly/sparc-struct-abi.rs @@ -2,9 +2,9 @@ // - float structure members are passes in floating point registers // (#86163) -// assembly-output: emit-asm -// needs-llvm-components: sparc -// compile-flags: --target=sparcv9-sun-solaris -Copt-level=3 +//@ assembly-output: emit-asm +//@ needs-llvm-components: sparc +//@ compile-flags: --target=sparcv9-sun-solaris -Copt-level=3 #![crate_type = "lib"] #![feature(no_core, lang_items)] #![no_core] diff --git a/tests/assembly/stack-probes.rs b/tests/assembly/stack-probes.rs index 6466df3ff7d6..ddabd4b1632a 100644 --- a/tests/assembly/stack-probes.rs +++ b/tests/assembly/stack-probes.rs @@ -1,12 +1,12 @@ -// revisions: x86_64 i686 aarch64 -// assembly-output: emit-asm -//[x86_64] compile-flags: --target x86_64-unknown-linux-gnu -C llvm-args=-x86-asm-syntax=intel -//[x86_64] needs-llvm-components: x86 -//[i686] compile-flags: --target i686-unknown-linux-gnu -C llvm-args=-x86-asm-syntax=intel -//[i686] needs-llvm-components: x86 -//[aarch64] compile-flags: --target aarch64-unknown-linux-gnu -//[aarch64] needs-llvm-components: aarch64 -//[aarch64] min-llvm-version: 18 +//@ revisions: x86_64 i686 aarch64 +//@ assembly-output: emit-asm +//@[x86_64] compile-flags: --target x86_64-unknown-linux-gnu -C llvm-args=-x86-asm-syntax=intel +//@[x86_64] needs-llvm-components: x86 +//@[i686] compile-flags: --target i686-unknown-linux-gnu -C llvm-args=-x86-asm-syntax=intel +//@[i686] needs-llvm-components: x86 +//@[aarch64] compile-flags: --target aarch64-unknown-linux-gnu +//@[aarch64] needs-llvm-components: aarch64 +//@[aarch64] min-llvm-version: 18 #![feature(no_core, lang_items)] #![crate_type = "lib"] diff --git a/tests/assembly/stack-protector/stack-protector-heuristics-effect-windows-32bit.rs b/tests/assembly/stack-protector/stack-protector-heuristics-effect-windows-32bit.rs index fca2c85d5a62..12339cb4415c 100644 --- a/tests/assembly/stack-protector/stack-protector-heuristics-effect-windows-32bit.rs +++ b/tests/assembly/stack-protector/stack-protector-heuristics-effect-windows-32bit.rs @@ -1,13 +1,13 @@ -// revisions: all strong basic none missing -// assembly-output: emit-asm -// only-windows -// only-msvc -// ignore-64bit 64-bit table based SEH has slightly different behaviors than classic SEH -// [all] compile-flags: -Z stack-protector=all -// [strong] compile-flags: -Z stack-protector=strong -// [basic] compile-flags: -Z stack-protector=basic -// [none] compile-flags: -Z stack-protector=none -// compile-flags: -C opt-level=2 -Z merge-functions=disabled +//@ revisions: all strong basic none missing +//@ assembly-output: emit-asm +//@ only-windows +//@ only-msvc +//@ ignore-64bit 64-bit table based SEH has slightly different behaviors than classic SEH +//@ [all] compile-flags: -Z stack-protector=all +//@ [strong] compile-flags: -Z stack-protector=strong +//@ [basic] compile-flags: -Z stack-protector=basic +//@ [none] compile-flags: -Z stack-protector=none +//@ compile-flags: -C opt-level=2 -Z merge-functions=disabled #![crate_type = "lib"] diff --git a/tests/assembly/stack-protector/stack-protector-heuristics-effect-windows-64bit.rs b/tests/assembly/stack-protector/stack-protector-heuristics-effect-windows-64bit.rs index d9abf554a92d..46c775112519 100644 --- a/tests/assembly/stack-protector/stack-protector-heuristics-effect-windows-64bit.rs +++ b/tests/assembly/stack-protector/stack-protector-heuristics-effect-windows-64bit.rs @@ -1,13 +1,13 @@ -// revisions: all strong basic none missing -// assembly-output: emit-asm -// only-windows -// only-msvc -// ignore-32bit 64-bit table based SEH has slightly different behaviors than classic SEH -// [all] compile-flags: -Z stack-protector=all -// [strong] compile-flags: -Z stack-protector=strong -// [basic] compile-flags: -Z stack-protector=basic -// [none] compile-flags: -Z stack-protector=none -// compile-flags: -C opt-level=2 -Z merge-functions=disabled +//@ revisions: all strong basic none missing +//@ assembly-output: emit-asm +//@ only-windows +//@ only-msvc +//@ ignore-32bit 64-bit table based SEH has slightly different behaviors than classic SEH +//@ [all] compile-flags: -Z stack-protector=all +//@ [strong] compile-flags: -Z stack-protector=strong +//@ [basic] compile-flags: -Z stack-protector=basic +//@ [none] compile-flags: -Z stack-protector=none +//@ compile-flags: -C opt-level=2 -Z merge-functions=disabled #![crate_type = "lib"] diff --git a/tests/assembly/stack-protector/stack-protector-heuristics-effect.rs b/tests/assembly/stack-protector/stack-protector-heuristics-effect.rs index ca566b6e46ae..e63adc88ff50 100644 --- a/tests/assembly/stack-protector/stack-protector-heuristics-effect.rs +++ b/tests/assembly/stack-protector/stack-protector-heuristics-effect.rs @@ -1,15 +1,15 @@ -// revisions: all strong basic none missing -// assembly-output: emit-asm -// ignore-macos slightly different policy on stack protection of arrays -// ignore-msvc stack check code uses different function names -// ignore-nvptx64 stack protector is not supported -// ignore-wasm32-bare -// [all] compile-flags: -Z stack-protector=all -// [strong] compile-flags: -Z stack-protector=strong -// [basic] compile-flags: -Z stack-protector=basic -// [none] compile-flags: -Z stack-protector=none -// compile-flags: -C opt-level=2 -Z merge-functions=disabled -// min-llvm-version: 17.0.2 +//@ revisions: all strong basic none missing +//@ assembly-output: emit-asm +//@ ignore-macos slightly different policy on stack protection of arrays +//@ ignore-msvc stack check code uses different function names +//@ ignore-nvptx64 stack protector is not supported +//@ ignore-wasm32-bare +//@ [all] compile-flags: -Z stack-protector=all +//@ [strong] compile-flags: -Z stack-protector=strong +//@ [basic] compile-flags: -Z stack-protector=basic +//@ [none] compile-flags: -Z stack-protector=none +//@ compile-flags: -C opt-level=2 -Z merge-functions=disabled +//@ min-llvm-version: 17.0.2 #![crate_type = "lib"] diff --git a/tests/assembly/stack-protector/stack-protector-target-support.rs b/tests/assembly/stack-protector/stack-protector-target-support.rs index 6d87fd1912b0..5fa93b3617ed 100644 --- a/tests/assembly/stack-protector/stack-protector-target-support.rs +++ b/tests/assembly/stack-protector/stack-protector-target-support.rs @@ -1,182 +1,182 @@ // Test that stack smash protection code is emitted for all tier1 and tier2 // targets, with the exception of nvptx64-nvidia-cuda // -// revisions: r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 r16 r17 r18 r19 r20 r21 r22 r23 -// revisions: r24 r25 r26 r27 r28 r29 r30 r31 r32 r33 r35 r36 r37 r38 r39 r40 r41 r42 r43 r44 -// revisions: r45 r46 r47 r48 r49 r50 r51 r52 r53 r54 r55 r56 r57 r58 r59 r60 r61 r62 r63 r64 r65 -// revisions: r66 r67 r68 r69 r70 r71 r72 r73 r74 r75 r76 r77 r78 r79 r80 r81 r82 r83 r84 -// assembly-output: emit-asm -// [r1] compile-flags: --target aarch64-unknown-linux-gnu -// [r1] needs-llvm-components: aarch64 -// [r2] compile-flags: --target i686-pc-windows-gnu -// [r2] needs-llvm-components: x86 -// [r3] compile-flags: --target i686-pc-windows-msvc -// [r3] needs-llvm-components: x86 -// [r4] compile-flags: --target i686-unknown-linux-gnu -// [r4] needs-llvm-components: x86 -// [r5] compile-flags: --target x86_64-apple-darwin -// [r5] needs-llvm-components: x86 -// [r6] compile-flags: --target x86_64-pc-windows-gnu -// [r6] needs-llvm-components: x86 -// [r7] compile-flags: --target x86_64-pc-windows-msvc -// [r7] needs-llvm-components: x86 -// [r8] compile-flags: --target x86_64-unknown-linux-gnu -// [r8] needs-llvm-components: x86 -// [r9] compile-flags: --target aarch64-apple-darwin -// [r9] needs-llvm-components: aarch64 -// [r10] compile-flags: --target aarch64-apple-ios -// [r10] needs-llvm-components: aarch64 -// [r11] compile-flags: --target aarch64-unknown-fuchsia -// [r11] needs-llvm-components: aarch64 -// [r12] compile-flags: --target aarch64-linux-android -// [r12] needs-llvm-components: aarch64 -// [r13] compile-flags: --target aarch64-pc-windows-msvc -// [r13] needs-llvm-components: aarch64 -// [r14] compile-flags: --target aarch64-unknown-linux-musl -// [r14] needs-llvm-components: aarch64 -// [r15] compile-flags: --target aarch64-unknown-none -// [r15] needs-llvm-components: aarch64 -// [r16] compile-flags: --target aarch64-unknown-none-softfloat -// [r16] needs-llvm-components: aarch64 -// [r17] compile-flags: --target arm-linux-androideabi -// [r17] needs-llvm-components: arm -// [r18] compile-flags: --target arm-unknown-linux-gnueabi -// [r18] needs-llvm-components: arm -// [r19] compile-flags: --target arm-unknown-linux-gnueabihf -// [r19] needs-llvm-components: arm -// [r20] compile-flags: --target arm-unknown-linux-musleabi -// [r20] needs-llvm-components: arm -// [r21] compile-flags: --target arm-unknown-linux-musleabihf -// [r21] needs-llvm-components: arm -// [r22] compile-flags: --target armebv7r-none-eabi -// [r22] needs-llvm-components: arm -// [r23] compile-flags: --target armebv7r-none-eabihf -// [r23] needs-llvm-components: arm -// [r24] compile-flags: --target armv5te-unknown-linux-gnueabi -// [r24] needs-llvm-components: arm -// [r25] compile-flags: --target armv5te-unknown-linux-musleabi -// [r25] needs-llvm-components: arm -// [r26] compile-flags: --target armv7-linux-androideabi -// [r26] needs-llvm-components: arm -// [r27] compile-flags: --target armv7a-none-eabi -// [r27] needs-llvm-components: arm -// [r28] compile-flags: --target armv7r-none-eabi -// [r28] needs-llvm-components: arm -// [r29] compile-flags: --target armv7r-none-eabihf -// [r29] needs-llvm-components: arm -// [r30] compile-flags: --target armv7-unknown-linux-gnueabi -// [r30] needs-llvm-components: arm -// [r31] compile-flags: --target armv7-unknown-linux-gnueabihf -// [r31] needs-llvm-components: arm -// [r32] compile-flags: --target armv7-unknown-linux-musleabi -// [r32] needs-llvm-components: arm -// [r33] compile-flags: --target armv7-unknown-linux-musleabihf -// [r33] needs-llvm-components: arm +//@ revisions: r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 r16 r17 r18 r19 r20 r21 r22 r23 +//@ revisions: r24 r25 r26 r27 r28 r29 r30 r31 r32 r33 r35 r36 r37 r38 r39 r40 r41 r42 r43 r44 +//@ revisions: r45 r46 r47 r48 r49 r50 r51 r52 r53 r54 r55 r56 r57 r58 r59 r60 r61 r62 r63 r64 r65 +//@ revisions: r66 r67 r68 r69 r70 r71 r72 r73 r74 r75 r76 r77 r78 r79 r80 r81 r82 r83 r84 r85 +//@ assembly-output: emit-asm +//@ [r1] compile-flags: --target aarch64-unknown-linux-gnu +//@ [r1] needs-llvm-components: aarch64 +//@ [r2] compile-flags: --target i686-pc-windows-gnu +//@ [r2] needs-llvm-components: x86 +//@ [r3] compile-flags: --target i686-pc-windows-msvc +//@ [r3] needs-llvm-components: x86 +//@ [r4] compile-flags: --target i686-unknown-linux-gnu +//@ [r4] needs-llvm-components: x86 +//@ [r5] compile-flags: --target x86_64-apple-darwin +//@ [r5] needs-llvm-components: x86 +//@ [r6] compile-flags: --target x86_64-pc-windows-gnu +//@ [r6] needs-llvm-components: x86 +//@ [r7] compile-flags: --target x86_64-pc-windows-msvc +//@ [r7] needs-llvm-components: x86 +//@ [r8] compile-flags: --target x86_64-unknown-linux-gnu +//@ [r8] needs-llvm-components: x86 +//@ [r9] compile-flags: --target aarch64-apple-darwin +//@ [r9] needs-llvm-components: aarch64 +//@ [r10] compile-flags: --target aarch64-apple-ios +//@ [r10] needs-llvm-components: aarch64 +//@ [r11] compile-flags: --target aarch64-unknown-fuchsia +//@ [r11] needs-llvm-components: aarch64 +//@ [r12] compile-flags: --target aarch64-linux-android +//@ [r12] needs-llvm-components: aarch64 +//@ [r13] compile-flags: --target aarch64-pc-windows-msvc +//@ [r13] needs-llvm-components: aarch64 +//@ [r14] compile-flags: --target aarch64-unknown-linux-musl +//@ [r14] needs-llvm-components: aarch64 +//@ [r15] compile-flags: --target aarch64-unknown-none +//@ [r15] needs-llvm-components: aarch64 +//@ [r16] compile-flags: --target aarch64-unknown-none-softfloat +//@ [r16] needs-llvm-components: aarch64 +//@ [r17] compile-flags: --target arm-linux-androideabi +//@ [r17] needs-llvm-components: arm +//@ [r18] compile-flags: --target arm-unknown-linux-gnueabi +//@ [r18] needs-llvm-components: arm +//@ [r19] compile-flags: --target arm-unknown-linux-gnueabihf +//@ [r19] needs-llvm-components: arm +//@ [r20] compile-flags: --target arm-unknown-linux-musleabi +//@ [r20] needs-llvm-components: arm +//@ [r21] compile-flags: --target arm-unknown-linux-musleabihf +//@ [r21] needs-llvm-components: arm +//@ [r22] compile-flags: --target armebv7r-none-eabi +//@ [r22] needs-llvm-components: arm +//@ [r23] compile-flags: --target armebv7r-none-eabihf +//@ [r23] needs-llvm-components: arm +//@ [r24] compile-flags: --target armv5te-unknown-linux-gnueabi +//@ [r24] needs-llvm-components: arm +//@ [r25] compile-flags: --target armv5te-unknown-linux-musleabi +//@ [r25] needs-llvm-components: arm +//@ [r26] compile-flags: --target armv7-linux-androideabi +//@ [r26] needs-llvm-components: arm +//@ [r27] compile-flags: --target armv7a-none-eabi +//@ [r27] needs-llvm-components: arm +//@ [r28] compile-flags: --target armv7r-none-eabi +//@ [r28] needs-llvm-components: arm +//@ [r29] compile-flags: --target armv7r-none-eabihf +//@ [r29] needs-llvm-components: arm +//@ [r30] compile-flags: --target armv7-unknown-linux-gnueabi +//@ [r30] needs-llvm-components: arm +//@ [r31] compile-flags: --target armv7-unknown-linux-gnueabihf +//@ [r31] needs-llvm-components: arm +//@ [r32] compile-flags: --target armv7-unknown-linux-musleabi +//@ [r32] needs-llvm-components: arm +//@ [r33] compile-flags: --target armv7-unknown-linux-musleabihf +//@ [r33] needs-llvm-components: arm -// [r35] compile-flags: --target i586-pc-windows-msvc -// [r35] needs-llvm-components: x86 -// [r36] compile-flags: --target i586-unknown-linux-gnu -// [r36] needs-llvm-components: x86 -// [r37] compile-flags: --target i586-unknown-linux-musl -// [r37] needs-llvm-components: x86 -// [r38] compile-flags: --target i686-linux-android -// [r38] needs-llvm-components: x86 -// [r39] compile-flags: --target i686-unknown-freebsd -// [r39] needs-llvm-components: x86 -// [r40] compile-flags: --target i686-unknown-linux-musl -// [r40] needs-llvm-components: x86 -// [r41] compile-flags: --target mips-unknown-linux-gnu -// [r41] needs-llvm-components: mips -// [r42] compile-flags: --target mips-unknown-linux-musl -// [r42] needs-llvm-components: mips -// [r43] compile-flags: --target mips64-unknown-linux-gnuabi64 -// [r43] needs-llvm-components: mips -// [r44] compile-flags: --target mips64-unknown-linux-muslabi64 -// [r44] needs-llvm-components: mips -// [r45] compile-flags: --target mips64el-unknown-linux-gnuabi64 -// [r45] needs-llvm-components: mips -// [r46] compile-flags: --target mips64el-unknown-linux-muslabi64 -// [r46] needs-llvm-components: mips -// [r47] compile-flags: --target mipsel-unknown-linux-gnu -// [r47] needs-llvm-components: mips -// [r48] compile-flags: --target mipsel-unknown-linux-musl -// [r48] needs-llvm-components: mips -// [r49] compile-flags: --target nvptx64-nvidia-cuda -// [r49] needs-llvm-components: nvptx -// [r50] compile-flags: --target powerpc-unknown-linux-gnu -// [r50] needs-llvm-components: powerpc -// [r51] compile-flags: --target powerpc64-unknown-linux-gnu -// [r51] needs-llvm-components: powerpc -// [r52] compile-flags: --target powerpc64le-unknown-linux-gnu -// [r52] needs-llvm-components: powerpc -// [r53] compile-flags: --target riscv32i-unknown-none-elf -// [r53] needs-llvm-components: riscv -// [r54] compile-flags: --target riscv32imac-unknown-none-elf -// [r54] needs-llvm-components: riscv -// [r55] compile-flags:--target riscv32imc-unknown-none-elf -// [r55] needs-llvm-components: riscv -// [r56] compile-flags:--target riscv64gc-unknown-linux-gnu -// [r56] needs-llvm-components: riscv -// [r57] compile-flags:--target riscv64gc-unknown-none-elf -// [r57] needs-llvm-components: riscv -// [r58] compile-flags:--target riscv64imac-unknown-none-elf -// [r58] needs-llvm-components: riscv -// [r59] compile-flags:--target s390x-unknown-linux-gnu -// [r59] needs-llvm-components: systemz -// [r60] compile-flags:--target sparc64-unknown-linux-gnu -// [r60] needs-llvm-components: sparc -// [r61] compile-flags:--target sparcv9-sun-solaris -// [r61] needs-llvm-components: sparc -// [r62] compile-flags:--target thumbv6m-none-eabi -// [r62] needs-llvm-components: arm -// [r63] compile-flags:--target thumbv7em-none-eabi -// [r63] needs-llvm-components: arm -// [r64] compile-flags:--target thumbv7em-none-eabihf -// [r64] needs-llvm-components: arm -// [r65] compile-flags:--target thumbv7m-none-eabi -// [r65] needs-llvm-components: arm -// [r66] compile-flags:--target thumbv7neon-linux-androideabi -// [r66] needs-llvm-components: arm -// [r67] compile-flags:--target thumbv7neon-unknown-linux-gnueabihf -// [r67] needs-llvm-components: arm -// [r68] compile-flags:--target thumbv8m.base-none-eabi -// [r68] needs-llvm-components: arm -// [r69] compile-flags:--target thumbv8m.main-none-eabi -// [r69] needs-llvm-components: arm -// [r70] compile-flags:--target thumbv8m.main-none-eabihf -// [r70] needs-llvm-components: arm -// [r71] compile-flags:--target wasm32-unknown-emscripten -// [r71] needs-llvm-components: webassembly -// [r72] compile-flags:--target wasm32-unknown-unknown -// [r72] needs-llvm-components: webassembly -// [r73] compile-flags:--target wasm32-wasi -// [r73] needs-llvm-components: webassembly -// [r74] compile-flags:--target wasm32-wasi-preview1-threads -// [r74] needs-llvm-components: webassembly -// [r75] compile-flags:--target x86_64-apple-ios -// [r75] needs-llvm-components: x86 -// [r76] compile-flags:--target x86_64-fortanix-unknown-sgx -// [r76] needs-llvm-components: x86 -// [r77] compile-flags:--target x86_64-unknown-fuchsia -// [r77] needs-llvm-components: x86 -// [r78] compile-flags:--target x86_64-linux-android -// [r78] needs-llvm-components: x86 -// [r79] compile-flags:--target x86_64-pc-solaris -// [r79] needs-llvm-components: x86 -// [r80] compile-flags:--target x86_64-unknown-freebsd -// [r80] needs-llvm-components: x86 -// [r81] compile-flags:--target x86_64-unknown-illumos -// [r81] needs-llvm-components: x86 -// [r82] compile-flags:--target x86_64-unknown-linux-gnux32 -// [r82] needs-llvm-components: x86 -// [r83] compile-flags:--target x86_64-unknown-linux-musl -// [r83] needs-llvm-components: x86 -// [r84] compile-flags:--target x86_64-unknown-netbsd -// [r84] needs-llvm-components: x86 -// [r85] compile-flags: --target x86_64-unknown-redox -// [r85] needs-llvm-components: x86 -// compile-flags: -Z stack-protector=all -// compile-flags: -C opt-level=2 +//@ [r35] compile-flags: --target i586-pc-windows-msvc +//@ [r35] needs-llvm-components: x86 +//@ [r36] compile-flags: --target i586-unknown-linux-gnu +//@ [r36] needs-llvm-components: x86 +//@ [r37] compile-flags: --target i586-unknown-linux-musl +//@ [r37] needs-llvm-components: x86 +//@ [r38] compile-flags: --target i686-linux-android +//@ [r38] needs-llvm-components: x86 +//@ [r39] compile-flags: --target i686-unknown-freebsd +//@ [r39] needs-llvm-components: x86 +//@ [r40] compile-flags: --target i686-unknown-linux-musl +//@ [r40] needs-llvm-components: x86 +//@ [r41] compile-flags: --target mips-unknown-linux-gnu +//@ [r41] needs-llvm-components: mips +//@ [r42] compile-flags: --target mips-unknown-linux-musl +//@ [r42] needs-llvm-components: mips +//@ [r43] compile-flags: --target mips64-unknown-linux-gnuabi64 +//@ [r43] needs-llvm-components: mips +//@ [r44] compile-flags: --target mips64-unknown-linux-muslabi64 +//@ [r44] needs-llvm-components: mips +//@ [r45] compile-flags: --target mips64el-unknown-linux-gnuabi64 +//@ [r45] needs-llvm-components: mips +//@ [r46] compile-flags: --target mips64el-unknown-linux-muslabi64 +//@ [r46] needs-llvm-components: mips +//@ [r47] compile-flags: --target mipsel-unknown-linux-gnu +//@ [r47] needs-llvm-components: mips +//@ [r48] compile-flags: --target mipsel-unknown-linux-musl +//@ [r48] needs-llvm-components: mips +//@ [r49] compile-flags: --target nvptx64-nvidia-cuda +//@ [r49] needs-llvm-components: nvptx +//@ [r50] compile-flags: --target powerpc-unknown-linux-gnu +//@ [r50] needs-llvm-components: powerpc +//@ [r51] compile-flags: --target powerpc64-unknown-linux-gnu +//@ [r51] needs-llvm-components: powerpc +//@ [r52] compile-flags: --target powerpc64le-unknown-linux-gnu +//@ [r52] needs-llvm-components: powerpc +//@ [r53] compile-flags: --target riscv32i-unknown-none-elf +//@ [r53] needs-llvm-components: riscv +//@ [r54] compile-flags: --target riscv32imac-unknown-none-elf +//@ [r54] needs-llvm-components: riscv +//@ [r55] compile-flags:--target riscv32imc-unknown-none-elf +//@ [r55] needs-llvm-components: riscv +//@ [r56] compile-flags:--target riscv64gc-unknown-linux-gnu +//@ [r56] needs-llvm-components: riscv +//@ [r57] compile-flags:--target riscv64gc-unknown-none-elf +//@ [r57] needs-llvm-components: riscv +//@ [r58] compile-flags:--target riscv64imac-unknown-none-elf +//@ [r58] needs-llvm-components: riscv +//@ [r59] compile-flags:--target s390x-unknown-linux-gnu +//@ [r59] needs-llvm-components: systemz +//@ [r60] compile-flags:--target sparc64-unknown-linux-gnu +//@ [r60] needs-llvm-components: sparc +//@ [r61] compile-flags:--target sparcv9-sun-solaris +//@ [r61] needs-llvm-components: sparc +//@ [r62] compile-flags:--target thumbv6m-none-eabi +//@ [r62] needs-llvm-components: arm +//@ [r63] compile-flags:--target thumbv7em-none-eabi +//@ [r63] needs-llvm-components: arm +//@ [r64] compile-flags:--target thumbv7em-none-eabihf +//@ [r64] needs-llvm-components: arm +//@ [r65] compile-flags:--target thumbv7m-none-eabi +//@ [r65] needs-llvm-components: arm +//@ [r66] compile-flags:--target thumbv7neon-linux-androideabi +//@ [r66] needs-llvm-components: arm +//@ [r67] compile-flags:--target thumbv7neon-unknown-linux-gnueabihf +//@ [r67] needs-llvm-components: arm +//@ [r68] compile-flags:--target thumbv8m.base-none-eabi +//@ [r68] needs-llvm-components: arm +//@ [r69] compile-flags:--target thumbv8m.main-none-eabi +//@ [r69] needs-llvm-components: arm +//@ [r70] compile-flags:--target thumbv8m.main-none-eabihf +//@ [r70] needs-llvm-components: arm +//@ [r71] compile-flags:--target wasm32-unknown-emscripten +//@ [r71] needs-llvm-components: webassembly +//@ [r72] compile-flags:--target wasm32-unknown-unknown +//@ [r72] needs-llvm-components: webassembly +//@ [r73] compile-flags:--target wasm32-wasi +//@ [r73] needs-llvm-components: webassembly +//@ [r74] compile-flags:--target wasm32-wasi-preview1-threads +//@ [r74] needs-llvm-components: webassembly +//@ [r75] compile-flags:--target x86_64-apple-ios +//@ [r75] needs-llvm-components: x86 +//@ [r76] compile-flags:--target x86_64-fortanix-unknown-sgx +//@ [r76] needs-llvm-components: x86 +//@ [r77] compile-flags:--target x86_64-unknown-fuchsia +//@ [r77] needs-llvm-components: x86 +//@ [r78] compile-flags:--target x86_64-linux-android +//@ [r78] needs-llvm-components: x86 +//@ [r79] compile-flags:--target x86_64-pc-solaris +//@ [r79] needs-llvm-components: x86 +//@ [r80] compile-flags:--target x86_64-unknown-freebsd +//@ [r80] needs-llvm-components: x86 +//@ [r81] compile-flags:--target x86_64-unknown-illumos +//@ [r81] needs-llvm-components: x86 +//@ [r82] compile-flags:--target x86_64-unknown-linux-gnux32 +//@ [r82] needs-llvm-components: x86 +//@ [r83] compile-flags:--target x86_64-unknown-linux-musl +//@ [r83] needs-llvm-components: x86 +//@ [r84] compile-flags:--target x86_64-unknown-netbsd +//@ [r84] needs-llvm-components: x86 +//@ [r85] compile-flags: --target x86_64-unknown-redox +//@ [r85] needs-llvm-components: x86 +//@ compile-flags: -Z stack-protector=all +//@ compile-flags: -C opt-level=2 #![crate_type = "lib"] @@ -283,4 +283,5 @@ pub fn foo() { // r82: __stack_chk_fail // r83: __stack_chk_fail // r84: __stack_chk_fail + // r85: __stack_chk_fail } diff --git a/tests/assembly/static-relocation-model.rs b/tests/assembly/static-relocation-model.rs index 41aa9a46103e..975818bf94fb 100644 --- a/tests/assembly/static-relocation-model.rs +++ b/tests/assembly/static-relocation-model.rs @@ -1,12 +1,12 @@ -// revisions: x64 A64 ppc64le -// assembly-output: emit-asm -// [x64] compile-flags: --target x86_64-unknown-linux-gnu -Crelocation-model=static -// [x64] needs-llvm-components: x86 -// [A64] compile-flags: --target aarch64-unknown-linux-gnu -Crelocation-model=static -// [A64] needs-llvm-components: aarch64 -// [ppc64le] compile-flags: --target powerpc64le-unknown-linux-gnu -Crelocation-model=static -// [ppc64le] needs-llvm-components: powerpc -// ignore-debug: alignment checks insert panics that we don't have a lang item for +//@ revisions: x64 A64 ppc64le +//@ assembly-output: emit-asm +//@ [x64] compile-flags: --target x86_64-unknown-linux-gnu -Crelocation-model=static +//@ [x64] needs-llvm-components: x86 +//@ [A64] compile-flags: --target aarch64-unknown-linux-gnu -Crelocation-model=static +//@ [A64] needs-llvm-components: aarch64 +//@ [ppc64le] compile-flags: --target powerpc64le-unknown-linux-gnu -Crelocation-model=static +//@ [ppc64le] needs-llvm-components: powerpc +//@ ignore-debug: alignment checks insert panics that we don't have a lang item for #![feature(no_core, lang_items)] #![no_core] diff --git a/tests/assembly/strict_provenance.rs b/tests/assembly/strict_provenance.rs index ef8566a93e28..1a7976709629 100644 --- a/tests/assembly/strict_provenance.rs +++ b/tests/assembly/strict_provenance.rs @@ -1,7 +1,7 @@ -// assembly-output: emit-asm -// compile-flags: -Copt-level=1 -// only-x86_64 -// ignore-sgx +//@ assembly-output: emit-asm +//@ compile-flags: -Copt-level=1 +//@ only-x86_64 +//@ ignore-sgx #![crate_type = "rlib"] // CHECK-LABEL: old_style diff --git a/tests/assembly/target-feature-multiple.rs b/tests/assembly/target-feature-multiple.rs index 5c5d93863d71..83c385686476 100644 --- a/tests/assembly/target-feature-multiple.rs +++ b/tests/assembly/target-feature-multiple.rs @@ -1,9 +1,9 @@ -// assembly-output: emit-asm -// needs-llvm-components: x86 -// revisions: TWOFLAGS SINGLEFLAG -// compile-flags: --target=x86_64-unknown-linux-gnu -// [TWOFLAGS] compile-flags: -C target-feature=+rdrnd -C target-feature=+rdseed -// [SINGLEFLAG] compile-flags: -C target-feature=+rdrnd,+rdseed +//@ assembly-output: emit-asm +//@ needs-llvm-components: x86 +//@ revisions: TWOFLAGS SINGLEFLAG +//@ compile-flags: --target=x86_64-unknown-linux-gnu +//@ [TWOFLAGS] compile-flags: -C target-feature=+rdrnd -C target-feature=+rdseed +//@ [SINGLEFLAG] compile-flags: -C target-feature=+rdrnd,+rdseed // Target features set via flags aren't necessarily reflected in the IR, so the only way to test // them is to build code that requires the features to be enabled to work. diff --git a/tests/assembly/targets/targets-elf.rs b/tests/assembly/targets/targets-elf.rs index 6105ea430ddd..0d8f1bc60252 100644 --- a/tests/assembly/targets/targets-elf.rs +++ b/tests/assembly/targets/targets-elf.rs @@ -1,182 +1,182 @@ -// assembly-output: emit-asm +//@ assembly-output: emit-asm // ignore-tidy-linelength -// revisions: aarch64_be_unknown_linux_gnu -// [aarch64_be_unknown_linux_gnu] compile-flags: --target aarch64_be-unknown-linux-gnu -// [aarch64_be_unknown_linux_gnu] needs-llvm-components: aarch64 -// revisions: aarch64_be_unknown_linux_gnu_ilp32 -// [aarch64_be_unknown_linux_gnu_ilp32] compile-flags: --target aarch64_be-unknown-linux-gnu_ilp32 -// [aarch64_be_unknown_linux_gnu_ilp32] needs-llvm-components: aarch64 -// revisions: aarch64_be_unknown_netbsd -// [aarch64_be_unknown_netbsd] compile-flags: --target aarch64_be-unknown-netbsd -// [aarch64_be_unknown_netbsd] needs-llvm-components: aarch64 -// revisions: aarch64_fuchsia -// [aarch64_fuchsia] compile-flags: --target aarch64-fuchsia -// [aarch64_fuchsia] needs-llvm-components: aarch64 -// revisions: aarch64_kmc_solid_asp3 -// [aarch64_kmc_solid_asp3] compile-flags: --target aarch64-kmc-solid_asp3 -// [aarch64_kmc_solid_asp3] needs-llvm-components: aarch64 -// revisions: aarch64_linux_android -// [aarch64_linux_android] compile-flags: --target aarch64-linux-android -// [aarch64_linux_android] needs-llvm-components: aarch64 -// revisions: aarch64_nintendo_switch_freestanding -// [aarch64_nintendo_switch_freestanding] compile-flags: --target aarch64-nintendo-switch-freestanding -// [aarch64_nintendo_switch_freestanding] needs-llvm-components: aarch64 -// revisions: aarch64_unknown_freebsd -// [aarch64_unknown_freebsd] compile-flags: --target aarch64-unknown-freebsd -// [aarch64_unknown_freebsd] needs-llvm-components: aarch64 -// revisions: aarch64_unknown_fuchsia -// [aarch64_unknown_fuchsia] compile-flags: --target aarch64-unknown-fuchsia -// [aarch64_unknown_fuchsia] needs-llvm-components: aarch64 -// revisions: aarch64_unknown_hermit -// [aarch64_unknown_hermit] compile-flags: --target aarch64-unknown-hermit -// [aarch64_unknown_hermit] needs-llvm-components: aarch64 -// revisions: aarch64_unknown_illumos -// [aarch64_unknown_illumos] compile-flags: --target aarch64-unknown-illumos -// [aarch64_unknown_illumos] needs-llvm-components: aarch64 -// revisions: aarch64_unknown_linux_gnu -// [aarch64_unknown_linux_gnu] compile-flags: --target aarch64-unknown-linux-gnu -// [aarch64_unknown_linux_gnu] needs-llvm-components: aarch64 -// revisions: aarch64_unknown_linux_gnu_ilp32 -// [aarch64_unknown_linux_gnu_ilp32] compile-flags: --target aarch64-unknown-linux-gnu_ilp32 -// [aarch64_unknown_linux_gnu_ilp32] needs-llvm-components: aarch64 -// revisions: aarch64_unknown_linux_musl -// [aarch64_unknown_linux_musl] compile-flags: --target aarch64-unknown-linux-musl -// [aarch64_unknown_linux_musl] needs-llvm-components: aarch64 -// revisions: aarch64_unknown_linux_ohos -// [aarch64_unknown_linux_ohos] compile-flags: --target aarch64-unknown-linux-ohos -// [aarch64_unknown_linux_ohos] needs-llvm-components: aarch64 -// revisions: aarch64_unknown_netbsd -// [aarch64_unknown_netbsd] compile-flags: --target aarch64-unknown-netbsd -// [aarch64_unknown_netbsd] needs-llvm-components: aarch64 -// revisions: aarch64_unknown_none -// [aarch64_unknown_none] compile-flags: --target aarch64-unknown-none -// [aarch64_unknown_none] needs-llvm-components: aarch64 -// revisions: aarch64_unknown_none_softfloat -// [aarch64_unknown_none_softfloat] compile-flags: --target aarch64-unknown-none-softfloat -// [aarch64_unknown_none_softfloat] needs-llvm-components: aarch64 -// revisions: aarch64_unknown_nto_qnx_710 -// [aarch64_unknown_nto_qnx_710] compile-flags: --target aarch64-unknown-nto-qnx710 -// [aarch64_unknown_nto_qnx_710] needs-llvm-components: aarch64 -// revisions: aarch64_unknown_openbsd -// [aarch64_unknown_openbsd] compile-flags: --target aarch64-unknown-openbsd -// [aarch64_unknown_openbsd] needs-llvm-components: aarch64 -// revisions: aarch64_unknown_redox -// [aarch64_unknown_redox] compile-flags: --target aarch64-unknown-redox -// [aarch64_unknown_redox] needs-llvm-components: aarch64 -// revisions: aarch64_unknown_teeos -// [aarch64_unknown_teeos] compile-flags: --target aarch64-unknown-teeos -// [aarch64_unknown_teeos] needs-llvm-components: aarch64 -// revisions: aarch64_wrs_vxworks -// [aarch64_wrs_vxworks] compile-flags: --target aarch64-wrs-vxworks -// [aarch64_wrs_vxworks] needs-llvm-components: aarch64 -// revisions: arm_linux_androideabi -// [arm_linux_androideabi] compile-flags: --target arm-linux-androideabi -// [arm_linux_androideabi] needs-llvm-components: arm -// revisions: arm_unknown_linux_gnueabi -// [arm_unknown_linux_gnueabi] compile-flags: --target arm-unknown-linux-gnueabi -// [arm_unknown_linux_gnueabi] needs-llvm-components: arm -// revisions: arm_unknown_linux_gnueabihf -// [arm_unknown_linux_gnueabihf] compile-flags: --target arm-unknown-linux-gnueabihf -// [arm_unknown_linux_gnueabihf] needs-llvm-components: arm -// revisions: arm_unknown_linux_musleabi -// [arm_unknown_linux_musleabi] compile-flags: --target arm-unknown-linux-musleabi -// [arm_unknown_linux_musleabi] needs-llvm-components: arm -// revisions: arm_unknown_linux_musleabihf -// [arm_unknown_linux_musleabihf] compile-flags: --target arm-unknown-linux-musleabihf -// [arm_unknown_linux_musleabihf] needs-llvm-components: arm -// revisions: armeb_unknown_linux_gnueabi -// [armeb_unknown_linux_gnueabi] compile-flags: --target armeb-unknown-linux-gnueabi -// [armeb_unknown_linux_gnueabi] needs-llvm-components: arm -// revisions: armebv7r_none_eabi -// [armebv7r_none_eabi] compile-flags: --target armebv7r-none-eabi -// [armebv7r_none_eabi] needs-llvm-components: arm -// revisions: armebv7r_none_eabihf -// [armebv7r_none_eabihf] compile-flags: --target armebv7r-none-eabihf -// [armebv7r_none_eabihf] needs-llvm-components: arm -// revisions: armv4t_none_eabi -// [armv4t_none_eabi] compile-flags: --target armv4t-none-eabi -// [armv4t_none_eabi] needs-llvm-components: arm -// revisions: armv4t_unknown_linux_gnueabi -// [armv4t_unknown_linux_gnueabi] compile-flags: --target armv4t-unknown-linux-gnueabi -// [armv4t_unknown_linux_gnueabi] needs-llvm-components: arm -// revisions: armv5te_none_eabi -// [armv5te_none_eabi] compile-flags: --target armv5te-none-eabi -// [armv5te_none_eabi] needs-llvm-components: arm -// revisions: armv5te_unknown_linux_gnueabi -// [armv5te_unknown_linux_gnueabi] compile-flags: --target armv5te-unknown-linux-gnueabi -// [armv5te_unknown_linux_gnueabi] needs-llvm-components: arm -// revisions: armv5te_unknown_linux_musleabi -// [armv5te_unknown_linux_musleabi] compile-flags: --target armv5te-unknown-linux-musleabi -// [armv5te_unknown_linux_musleabi] needs-llvm-components: arm -// revisions: armv5te_unknown_linux_uclibceabi -// [armv5te_unknown_linux_uclibceabi] compile-flags: --target armv5te-unknown-linux-uclibceabi -// [armv5te_unknown_linux_uclibceabi] needs-llvm-components: arm -// revisions: armv6_unknown_freebsd -// [armv6_unknown_freebsd] compile-flags: --target armv6-unknown-freebsd -// [armv6_unknown_freebsd] needs-llvm-components: arm -// revisions: armv6_unknown_netbsd_eabihf -// [armv6_unknown_netbsd_eabihf] compile-flags: --target armv6-unknown-netbsd-eabihf -// [armv6_unknown_netbsd_eabihf] needs-llvm-components: arm -// revisions: armv6k_nintendo_3ds -// [armv6k_nintendo_3ds] compile-flags: --target armv6k-nintendo-3ds -// [armv6k_nintendo_3ds] needs-llvm-components: arm -// revisions: armv7_linux_androideabi -// [armv7_linux_androideabi] compile-flags: --target armv7-linux-androideabi -// [armv7_linux_androideabi] needs-llvm-components: arm -// revisions: armv7_sony_vita_newlibeabihf -// [armv7_sony_vita_newlibeabihf] compile-flags: --target armv7-sony-vita-newlibeabihf -// [armv7_sony_vita_newlibeabihf] needs-llvm-components: arm -// revisions: armv7_unknown_freebsd -// [armv7_unknown_freebsd] compile-flags: --target armv7-unknown-freebsd -// [armv7_unknown_freebsd] needs-llvm-components: arm -// revisions: armv7_unknown_linux_gnueabi -// [armv7_unknown_linux_gnueabi] compile-flags: --target armv7-unknown-linux-gnueabi -// [armv7_unknown_linux_gnueabi] needs-llvm-components: arm -// revisions: armv7_unknown_linux_gnueabihf -// [armv7_unknown_linux_gnueabihf] compile-flags: --target armv7-unknown-linux-gnueabihf -// [armv7_unknown_linux_gnueabihf] needs-llvm-components: arm -// revisions: armv7_unknown_linux_musleabi -// [armv7_unknown_linux_musleabi] compile-flags: --target armv7-unknown-linux-musleabi -// [armv7_unknown_linux_musleabi] needs-llvm-components: arm -// revisions: armv7_unknown_linux_musleabihf -// [armv7_unknown_linux_musleabihf] compile-flags: --target armv7-unknown-linux-musleabihf -// [armv7_unknown_linux_musleabihf] needs-llvm-components: arm -// revisions: armv7_unknown_linux_ohos -// [armv7_unknown_linux_ohos] compile-flags: --target armv7-unknown-linux-ohos -// [armv7_unknown_linux_ohos] needs-llvm-components: arm -// revisions: armv7_unknown_linux_uclibceabi -// [armv7_unknown_linux_uclibceabi] compile-flags: --target armv7-unknown-linux-uclibceabi -// [armv7_unknown_linux_uclibceabi] needs-llvm-components: arm -// revisions: armv7_unknown_linux_uclibceabihf -// [armv7_unknown_linux_uclibceabihf] compile-flags: --target armv7-unknown-linux-uclibceabihf -// [armv7_unknown_linux_uclibceabihf] needs-llvm-components: arm -// revisions: armv7_unknown_netbsd_eabihf -// [armv7_unknown_netbsd_eabihf] compile-flags: --target armv7-unknown-netbsd-eabihf -// [armv7_unknown_netbsd_eabihf] needs-llvm-components: arm -// revisions: armv7_wrs_vxworks_eabihf -// [armv7_wrs_vxworks_eabihf] compile-flags: --target armv7-wrs-vxworks-eabihf -// [armv7_wrs_vxworks_eabihf] needs-llvm-components: arm -// revisions: armv7a_kmc_solid_asp3_eabi -// [armv7a_kmc_solid_asp3_eabi] compile-flags: --target armv7a-kmc-solid_asp3-eabi -// [armv7a_kmc_solid_asp3_eabi] needs-llvm-components: arm -// revisions: armv7a_kmc_solid_asp3_eabihf -// [armv7a_kmc_solid_asp3_eabihf] compile-flags: --target armv7a-kmc-solid_asp3-eabihf -// [armv7a_kmc_solid_asp3_eabihf] needs-llvm-components: arm -// revisions: armv7a_none_eabi -// [armv7a_none_eabi] compile-flags: --target armv7a-none-eabi -// [armv7a_none_eabi] needs-llvm-components: arm -// revisions: armv7a_none_eabihf -// [armv7a_none_eabihf] compile-flags: --target armv7a-none-eabihf -// [armv7a_none_eabihf] needs-llvm-components: arm -// revisions: armv7r_none_eabi -// [armv7r_none_eabi] compile-flags: --target armv7r-none-eabi -// [armv7r_none_eabi] needs-llvm-components: arm -// revisions: armv7r_none_eabihf -// [armv7r_none_eabihf] compile-flags: --target armv7r-none-eabihf -// [armv7r_none_eabihf] needs-llvm-components: arm -// revisions: armv8r_none_eabihf -// [armv8r_none_eabihf] compile-flags: --target armv8r-none-eabihf -// [armv8r_none_eabihf] needs-llvm-components: arm +//@ revisions: aarch64_be_unknown_linux_gnu +//@ [aarch64_be_unknown_linux_gnu] compile-flags: --target aarch64_be-unknown-linux-gnu +//@ [aarch64_be_unknown_linux_gnu] needs-llvm-components: aarch64 +//@ revisions: aarch64_be_unknown_linux_gnu_ilp32 +//@ [aarch64_be_unknown_linux_gnu_ilp32] compile-flags: --target aarch64_be-unknown-linux-gnu_ilp32 +//@ [aarch64_be_unknown_linux_gnu_ilp32] needs-llvm-components: aarch64 +//@ revisions: aarch64_be_unknown_netbsd +//@ [aarch64_be_unknown_netbsd] compile-flags: --target aarch64_be-unknown-netbsd +//@ [aarch64_be_unknown_netbsd] needs-llvm-components: aarch64 +//@ revisions: aarch64_fuchsia +//@ [aarch64_fuchsia] compile-flags: --target aarch64-fuchsia +//@ [aarch64_fuchsia] needs-llvm-components: aarch64 +//@ revisions: aarch64_kmc_solid_asp3 +//@ [aarch64_kmc_solid_asp3] compile-flags: --target aarch64-kmc-solid_asp3 +//@ [aarch64_kmc_solid_asp3] needs-llvm-components: aarch64 +//@ revisions: aarch64_linux_android +//@ [aarch64_linux_android] compile-flags: --target aarch64-linux-android +//@ [aarch64_linux_android] needs-llvm-components: aarch64 +//@ revisions: aarch64_nintendo_switch_freestanding +//@ [aarch64_nintendo_switch_freestanding] compile-flags: --target aarch64-nintendo-switch-freestanding +//@ [aarch64_nintendo_switch_freestanding] needs-llvm-components: aarch64 +//@ revisions: aarch64_unknown_freebsd +//@ [aarch64_unknown_freebsd] compile-flags: --target aarch64-unknown-freebsd +//@ [aarch64_unknown_freebsd] needs-llvm-components: aarch64 +//@ revisions: aarch64_unknown_fuchsia +//@ [aarch64_unknown_fuchsia] compile-flags: --target aarch64-unknown-fuchsia +//@ [aarch64_unknown_fuchsia] needs-llvm-components: aarch64 +//@ revisions: aarch64_unknown_hermit +//@ [aarch64_unknown_hermit] compile-flags: --target aarch64-unknown-hermit +//@ [aarch64_unknown_hermit] needs-llvm-components: aarch64 +//@ revisions: aarch64_unknown_illumos +//@ [aarch64_unknown_illumos] compile-flags: --target aarch64-unknown-illumos +//@ [aarch64_unknown_illumos] needs-llvm-components: aarch64 +//@ revisions: aarch64_unknown_linux_gnu +//@ [aarch64_unknown_linux_gnu] compile-flags: --target aarch64-unknown-linux-gnu +//@ [aarch64_unknown_linux_gnu] needs-llvm-components: aarch64 +//@ revisions: aarch64_unknown_linux_gnu_ilp32 +//@ [aarch64_unknown_linux_gnu_ilp32] compile-flags: --target aarch64-unknown-linux-gnu_ilp32 +//@ [aarch64_unknown_linux_gnu_ilp32] needs-llvm-components: aarch64 +//@ revisions: aarch64_unknown_linux_musl +//@ [aarch64_unknown_linux_musl] compile-flags: --target aarch64-unknown-linux-musl +//@ [aarch64_unknown_linux_musl] needs-llvm-components: aarch64 +//@ revisions: aarch64_unknown_linux_ohos +//@ [aarch64_unknown_linux_ohos] compile-flags: --target aarch64-unknown-linux-ohos +//@ [aarch64_unknown_linux_ohos] needs-llvm-components: aarch64 +//@ revisions: aarch64_unknown_netbsd +//@ [aarch64_unknown_netbsd] compile-flags: --target aarch64-unknown-netbsd +//@ [aarch64_unknown_netbsd] needs-llvm-components: aarch64 +//@ revisions: aarch64_unknown_none +//@ [aarch64_unknown_none] compile-flags: --target aarch64-unknown-none +//@ [aarch64_unknown_none] needs-llvm-components: aarch64 +//@ revisions: aarch64_unknown_none_softfloat +//@ [aarch64_unknown_none_softfloat] compile-flags: --target aarch64-unknown-none-softfloat +//@ [aarch64_unknown_none_softfloat] needs-llvm-components: aarch64 +//@ revisions: aarch64_unknown_nto_qnx_710 +//@ [aarch64_unknown_nto_qnx_710] compile-flags: --target aarch64-unknown-nto-qnx710 +//@ [aarch64_unknown_nto_qnx_710] needs-llvm-components: aarch64 +//@ revisions: aarch64_unknown_openbsd +//@ [aarch64_unknown_openbsd] compile-flags: --target aarch64-unknown-openbsd +//@ [aarch64_unknown_openbsd] needs-llvm-components: aarch64 +//@ revisions: aarch64_unknown_redox +//@ [aarch64_unknown_redox] compile-flags: --target aarch64-unknown-redox +//@ [aarch64_unknown_redox] needs-llvm-components: aarch64 +//@ revisions: aarch64_unknown_teeos +//@ [aarch64_unknown_teeos] compile-flags: --target aarch64-unknown-teeos +//@ [aarch64_unknown_teeos] needs-llvm-components: aarch64 +//@ revisions: aarch64_wrs_vxworks +//@ [aarch64_wrs_vxworks] compile-flags: --target aarch64-wrs-vxworks +//@ [aarch64_wrs_vxworks] needs-llvm-components: aarch64 +//@ revisions: arm_linux_androideabi +//@ [arm_linux_androideabi] compile-flags: --target arm-linux-androideabi +//@ [arm_linux_androideabi] needs-llvm-components: arm +//@ revisions: arm_unknown_linux_gnueabi +//@ [arm_unknown_linux_gnueabi] compile-flags: --target arm-unknown-linux-gnueabi +//@ [arm_unknown_linux_gnueabi] needs-llvm-components: arm +//@ revisions: arm_unknown_linux_gnueabihf +//@ [arm_unknown_linux_gnueabihf] compile-flags: --target arm-unknown-linux-gnueabihf +//@ [arm_unknown_linux_gnueabihf] needs-llvm-components: arm +//@ revisions: arm_unknown_linux_musleabi +//@ [arm_unknown_linux_musleabi] compile-flags: --target arm-unknown-linux-musleabi +//@ [arm_unknown_linux_musleabi] needs-llvm-components: arm +//@ revisions: arm_unknown_linux_musleabihf +//@ [arm_unknown_linux_musleabihf] compile-flags: --target arm-unknown-linux-musleabihf +//@ [arm_unknown_linux_musleabihf] needs-llvm-components: arm +//@ revisions: armeb_unknown_linux_gnueabi +//@ [armeb_unknown_linux_gnueabi] compile-flags: --target armeb-unknown-linux-gnueabi +//@ [armeb_unknown_linux_gnueabi] needs-llvm-components: arm +//@ revisions: armebv7r_none_eabi +//@ [armebv7r_none_eabi] compile-flags: --target armebv7r-none-eabi +//@ [armebv7r_none_eabi] needs-llvm-components: arm +//@ revisions: armebv7r_none_eabihf +//@ [armebv7r_none_eabihf] compile-flags: --target armebv7r-none-eabihf +//@ [armebv7r_none_eabihf] needs-llvm-components: arm +//@ revisions: armv4t_none_eabi +//@ [armv4t_none_eabi] compile-flags: --target armv4t-none-eabi +//@ [armv4t_none_eabi] needs-llvm-components: arm +//@ revisions: armv4t_unknown_linux_gnueabi +//@ [armv4t_unknown_linux_gnueabi] compile-flags: --target armv4t-unknown-linux-gnueabi +//@ [armv4t_unknown_linux_gnueabi] needs-llvm-components: arm +//@ revisions: armv5te_none_eabi +//@ [armv5te_none_eabi] compile-flags: --target armv5te-none-eabi +//@ [armv5te_none_eabi] needs-llvm-components: arm +//@ revisions: armv5te_unknown_linux_gnueabi +//@ [armv5te_unknown_linux_gnueabi] compile-flags: --target armv5te-unknown-linux-gnueabi +//@ [armv5te_unknown_linux_gnueabi] needs-llvm-components: arm +//@ revisions: armv5te_unknown_linux_musleabi +//@ [armv5te_unknown_linux_musleabi] compile-flags: --target armv5te-unknown-linux-musleabi +//@ [armv5te_unknown_linux_musleabi] needs-llvm-components: arm +//@ revisions: armv5te_unknown_linux_uclibceabi +//@ [armv5te_unknown_linux_uclibceabi] compile-flags: --target armv5te-unknown-linux-uclibceabi +//@ [armv5te_unknown_linux_uclibceabi] needs-llvm-components: arm +//@ revisions: armv6_unknown_freebsd +//@ [armv6_unknown_freebsd] compile-flags: --target armv6-unknown-freebsd +//@ [armv6_unknown_freebsd] needs-llvm-components: arm +//@ revisions: armv6_unknown_netbsd_eabihf +//@ [armv6_unknown_netbsd_eabihf] compile-flags: --target armv6-unknown-netbsd-eabihf +//@ [armv6_unknown_netbsd_eabihf] needs-llvm-components: arm +//@ revisions: armv6k_nintendo_3ds +//@ [armv6k_nintendo_3ds] compile-flags: --target armv6k-nintendo-3ds +//@ [armv6k_nintendo_3ds] needs-llvm-components: arm +//@ revisions: armv7_linux_androideabi +//@ [armv7_linux_androideabi] compile-flags: --target armv7-linux-androideabi +//@ [armv7_linux_androideabi] needs-llvm-components: arm +//@ revisions: armv7_sony_vita_newlibeabihf +//@ [armv7_sony_vita_newlibeabihf] compile-flags: --target armv7-sony-vita-newlibeabihf +//@ [armv7_sony_vita_newlibeabihf] needs-llvm-components: arm +//@ revisions: armv7_unknown_freebsd +//@ [armv7_unknown_freebsd] compile-flags: --target armv7-unknown-freebsd +//@ [armv7_unknown_freebsd] needs-llvm-components: arm +//@ revisions: armv7_unknown_linux_gnueabi +//@ [armv7_unknown_linux_gnueabi] compile-flags: --target armv7-unknown-linux-gnueabi +//@ [armv7_unknown_linux_gnueabi] needs-llvm-components: arm +//@ revisions: armv7_unknown_linux_gnueabihf +//@ [armv7_unknown_linux_gnueabihf] compile-flags: --target armv7-unknown-linux-gnueabihf +//@ [armv7_unknown_linux_gnueabihf] needs-llvm-components: arm +//@ revisions: armv7_unknown_linux_musleabi +//@ [armv7_unknown_linux_musleabi] compile-flags: --target armv7-unknown-linux-musleabi +//@ [armv7_unknown_linux_musleabi] needs-llvm-components: arm +//@ revisions: armv7_unknown_linux_musleabihf +//@ [armv7_unknown_linux_musleabihf] compile-flags: --target armv7-unknown-linux-musleabihf +//@ [armv7_unknown_linux_musleabihf] needs-llvm-components: arm +//@ revisions: armv7_unknown_linux_ohos +//@ [armv7_unknown_linux_ohos] compile-flags: --target armv7-unknown-linux-ohos +//@ [armv7_unknown_linux_ohos] needs-llvm-components: arm +//@ revisions: armv7_unknown_linux_uclibceabi +//@ [armv7_unknown_linux_uclibceabi] compile-flags: --target armv7-unknown-linux-uclibceabi +//@ [armv7_unknown_linux_uclibceabi] needs-llvm-components: arm +//@ revisions: armv7_unknown_linux_uclibceabihf +//@ [armv7_unknown_linux_uclibceabihf] compile-flags: --target armv7-unknown-linux-uclibceabihf +//@ [armv7_unknown_linux_uclibceabihf] needs-llvm-components: arm +//@ revisions: armv7_unknown_netbsd_eabihf +//@ [armv7_unknown_netbsd_eabihf] compile-flags: --target armv7-unknown-netbsd-eabihf +//@ [armv7_unknown_netbsd_eabihf] needs-llvm-components: arm +//@ revisions: armv7_wrs_vxworks_eabihf +//@ [armv7_wrs_vxworks_eabihf] compile-flags: --target armv7-wrs-vxworks-eabihf +//@ [armv7_wrs_vxworks_eabihf] needs-llvm-components: arm +//@ revisions: armv7a_kmc_solid_asp3_eabi +//@ [armv7a_kmc_solid_asp3_eabi] compile-flags: --target armv7a-kmc-solid_asp3-eabi +//@ [armv7a_kmc_solid_asp3_eabi] needs-llvm-components: arm +//@ revisions: armv7a_kmc_solid_asp3_eabihf +//@ [armv7a_kmc_solid_asp3_eabihf] compile-flags: --target armv7a-kmc-solid_asp3-eabihf +//@ [armv7a_kmc_solid_asp3_eabihf] needs-llvm-components: arm +//@ revisions: armv7a_none_eabi +//@ [armv7a_none_eabi] compile-flags: --target armv7a-none-eabi +//@ [armv7a_none_eabi] needs-llvm-components: arm +//@ revisions: armv7a_none_eabihf +//@ [armv7a_none_eabihf] compile-flags: --target armv7a-none-eabihf +//@ [armv7a_none_eabihf] needs-llvm-components: arm +//@ revisions: armv7r_none_eabi +//@ [armv7r_none_eabi] compile-flags: --target armv7r-none-eabi +//@ [armv7r_none_eabi] needs-llvm-components: arm +//@ revisions: armv7r_none_eabihf +//@ [armv7r_none_eabihf] compile-flags: --target armv7r-none-eabihf +//@ [armv7r_none_eabihf] needs-llvm-components: arm +//@ revisions: armv8r_none_eabihf +//@ [armv8r_none_eabihf] compile-flags: --target armv8r-none-eabihf +//@ [armv8r_none_eabihf] needs-llvm-components: arm // FIXME: disabled since it fails on CI saying the csky component is missing /* revisions: csky_unknown_linux_gnuabiv2 @@ -186,378 +186,378 @@ [csky_unknown_linux_gnuabiv2hf] compile-flags: --target csky-unknown-linux-gnuabiv2hf [csky_unknown_linux_gnuabiv2hf] needs-llvm-components: csky */ -// revisions: hexagon_unknown_linux_musl -// [hexagon_unknown_linux_musl] compile-flags: --target hexagon-unknown-linux-musl -// [hexagon_unknown_linux_musl] needs-llvm-components: hexagon -// revisions: hexagon_unknown_none_elf -// [hexagon_unknown_none_elf] compile-flags: --target hexagon-unknown-none-elf -// [hexagon_unknown_none_elf] needs-llvm-components: hexagon -// revisions: i586_pc_nto_qnx700 -// [i586_pc_nto_qnx700] compile-flags: --target i586-pc-nto-qnx700 -// [i586_pc_nto_qnx700] needs-llvm-components: x86 -// revisions: i586_unknown_linux_gnu -// [i586_unknown_linux_gnu] compile-flags: --target i586-unknown-linux-gnu -// [i586_unknown_linux_gnu] needs-llvm-components: x86 -// revisions: i586_unknown_linux_musl -// [i586_unknown_linux_musl] compile-flags: --target i586-unknown-linux-musl -// [i586_unknown_linux_musl] needs-llvm-components: x86 -// revisions: i586_unknown_netbsd -// [i586_unknown_netbsd] compile-flags: --target i586-unknown-netbsd -// [i586_unknown_netbsd] needs-llvm-components: x86 -// revisions: i686_linux_android -// [i686_linux_android] compile-flags: --target i686-linux-android -// [i686_linux_android] needs-llvm-components: x86 -// revisions: i686_unknown_freebsd -// [i686_unknown_freebsd] compile-flags: --target i686-unknown-freebsd -// [i686_unknown_freebsd] needs-llvm-components: x86 -// revisions: i686_unknown_haiku -// [i686_unknown_haiku] compile-flags: --target i686-unknown-haiku -// [i686_unknown_haiku] needs-llvm-components: x86 -// revisions: i686_unknown_hurd_gnu -// [i686_unknown_hurd_gnu] compile-flags: --target i686-unknown-hurd-gnu -// [i686_unknown_hurd_gnu] needs-llvm-components: x86 -// revisions: i686_unknown_linux_gnu -// [i686_unknown_linux_gnu] compile-flags: --target i686-unknown-linux-gnu -// [i686_unknown_linux_gnu] needs-llvm-components: x86 -// revisions: i686_unknown_linux_musl -// [i686_unknown_linux_musl] compile-flags: --target i686-unknown-linux-musl -// [i686_unknown_linux_musl] needs-llvm-components: x86 -// revisions: i686_unknown_netbsd -// [i686_unknown_netbsd] compile-flags: --target i686-unknown-netbsd -// [i686_unknown_netbsd] needs-llvm-components: x86 -// revisions: i686_unknown_openbsd -// [i686_unknown_openbsd] compile-flags: --target i686-unknown-openbsd -// [i686_unknown_openbsd] needs-llvm-components: x86 -// revisions: i686_wrs_vxworks -// [i686_wrs_vxworks] compile-flags: --target i686-wrs-vxworks -// [i686_wrs_vxworks] needs-llvm-components: x86 -// revisions: loongarch64_unknown_linux_gnu -// [loongarch64_unknown_linux_gnu] compile-flags: --target loongarch64-unknown-linux-gnu -// [loongarch64_unknown_linux_gnu] needs-llvm-components: loongarch -// revisions: loongarch64_unknown_none -// [loongarch64_unknown_none] compile-flags: --target loongarch64-unknown-none -// [loongarch64_unknown_none] needs-llvm-components: loongarch -// revisions: loongarch64_unknown_none_softfloat -// [loongarch64_unknown_none_softfloat] compile-flags: --target loongarch64-unknown-none-softfloat -// [loongarch64_unknown_none_softfloat] needs-llvm-components: loongarch -// revisions: m68k_unknown_linux_gnu -// [m68k_unknown_linux_gnu] compile-flags: --target m68k-unknown-linux-gnu -// [m68k_unknown_linux_gnu] needs-llvm-components: m68k -// revisions: mips64_openwrt_linux_musl -// [mips64_openwrt_linux_musl] compile-flags: --target mips64-openwrt-linux-musl -// [mips64_openwrt_linux_musl] needs-llvm-components: mips -// revisions: mips64_unknown_linux_gnuabi64 -// [mips64_unknown_linux_gnuabi64] compile-flags: --target mips64-unknown-linux-gnuabi64 -// [mips64_unknown_linux_gnuabi64] needs-llvm-components: mips -// revisions: mips64_unknown_linux_muslabi64 -// [mips64_unknown_linux_muslabi64] compile-flags: --target mips64-unknown-linux-muslabi64 -// [mips64_unknown_linux_muslabi64] needs-llvm-components: mips -// revisions: mips64el_unknown_linux_gnuabi64 -// [mips64el_unknown_linux_gnuabi64] compile-flags: --target mips64el-unknown-linux-gnuabi64 -// [mips64el_unknown_linux_gnuabi64] needs-llvm-components: mips -// revisions: mips64el_unknown_linux_muslabi64 -// [mips64el_unknown_linux_muslabi64] compile-flags: --target mips64el-unknown-linux-muslabi64 -// [mips64el_unknown_linux_muslabi64] needs-llvm-components: mips -// revisions: mips_unknown_linux_gnu -// [mips_unknown_linux_gnu] compile-flags: --target mips-unknown-linux-gnu -// [mips_unknown_linux_gnu] needs-llvm-components: mips -// revisions: mips_unknown_linux_musl -// [mips_unknown_linux_musl] compile-flags: --target mips-unknown-linux-musl -// [mips_unknown_linux_musl] needs-llvm-components: mips -// revisions: mips_unknown_linux_uclibc -// [mips_unknown_linux_uclibc] compile-flags: --target mips-unknown-linux-uclibc -// [mips_unknown_linux_uclibc] needs-llvm-components: mips -// revisions: mipsel_sony_psp -// [mipsel_sony_psp] compile-flags: --target mipsel-sony-psp -// [mipsel_sony_psp] needs-llvm-components: mips -// revisions: mipsel_sony_psx -// [mipsel_sony_psx] compile-flags: --target mipsel-sony-psx -// [mipsel_sony_psx] needs-llvm-components: mips -// revisions: mipsel_unknown_linux_gnu -// [mipsel_unknown_linux_gnu] compile-flags: --target mipsel-unknown-linux-gnu -// [mipsel_unknown_linux_gnu] needs-llvm-components: mips -// revisions: mipsel_unknown_linux_musl -// [mipsel_unknown_linux_musl] compile-flags: --target mipsel-unknown-linux-musl -// [mipsel_unknown_linux_musl] needs-llvm-components: mips -// revisions: mipsel_unknown_linux_uclibc -// [mipsel_unknown_linux_uclibc] compile-flags: --target mipsel-unknown-linux-uclibc -// [mipsel_unknown_linux_uclibc] needs-llvm-components: mips -// revisions: mipsel_unknown_netbsd -// [mipsel_unknown_netbsd] compile-flags: --target mipsel-unknown-netbsd -// [mipsel_unknown_netbsd] needs-llvm-components: mips -// revisions: mipsel_unknown_none -// [mipsel_unknown_none] compile-flags: --target mipsel-unknown-none -// [mipsel_unknown_none] needs-llvm-components: mips -// revisions: mipsisa32r6_unknown_linux_gnu -// [mipsisa32r6_unknown_linux_gnu] compile-flags: --target mipsisa32r6-unknown-linux-gnu -// [mipsisa32r6_unknown_linux_gnu] needs-llvm-components: mips -// revisions: mipsisa32r6el_unknown_linux_gnu -// [mipsisa32r6el_unknown_linux_gnu] compile-flags: --target mipsisa32r6el-unknown-linux-gnu -// [mipsisa32r6el_unknown_linux_gnu] needs-llvm-components: mips -// revisions: mipsisa64r6_unknown_linux_gnuabi64 -// [mipsisa64r6_unknown_linux_gnuabi64] compile-flags: --target mipsisa64r6-unknown-linux-gnuabi64 -// [mipsisa64r6_unknown_linux_gnuabi64] needs-llvm-components: mips -// revisions: mipsisa64r6el_unknown_linux_gnuabi64 -// [mipsisa64r6el_unknown_linux_gnuabi64] compile-flags: --target mipsisa64r6el-unknown-linux-gnuabi64 -// [mipsisa64r6el_unknown_linux_gnuabi64] needs-llvm-components: mips -// revisions: msp430_none_elf -// [msp430_none_elf] compile-flags: --target msp430-none-elf -// [msp430_none_elf] needs-llvm-components: msp430 -// revisions: powerpc64_unknown_freebsd -// [powerpc64_unknown_freebsd] compile-flags: --target powerpc64-unknown-freebsd -// [powerpc64_unknown_freebsd] needs-llvm-components: powerpc -// revisions: powerpc64_unknown_linux_gnu -// [powerpc64_unknown_linux_gnu] compile-flags: --target powerpc64-unknown-linux-gnu -// [powerpc64_unknown_linux_gnu] needs-llvm-components: powerpc -// revisions: powerpc64_unknown_linux_musl -// [powerpc64_unknown_linux_musl] compile-flags: --target powerpc64-unknown-linux-musl -// [powerpc64_unknown_linux_musl] needs-llvm-components: powerpc -// revisions: powerpc64_unknown_openbsd -// [powerpc64_unknown_openbsd] compile-flags: --target powerpc64-unknown-openbsd -// [powerpc64_unknown_openbsd] needs-llvm-components: powerpc -// revisions: powerpc64_wrs_vxworks -// [powerpc64_wrs_vxworks] compile-flags: --target powerpc64-wrs-vxworks -// [powerpc64_wrs_vxworks] needs-llvm-components: powerpc -// revisions: powerpc64le_unknown_freebsd -// [powerpc64le_unknown_freebsd] compile-flags: --target powerpc64le-unknown-freebsd -// [powerpc64le_unknown_freebsd] needs-llvm-components: powerpc -// revisions: powerpc64le_unknown_linux_gnu -// [powerpc64le_unknown_linux_gnu] compile-flags: --target powerpc64le-unknown-linux-gnu -// [powerpc64le_unknown_linux_gnu] needs-llvm-components: powerpc -// revisions: powerpc64le_unknown_linux_musl -// [powerpc64le_unknown_linux_musl] compile-flags: --target powerpc64le-unknown-linux-musl -// [powerpc64le_unknown_linux_musl] needs-llvm-components: powerpc -// revisions: powerpc_unknown_freebsd -// [powerpc_unknown_freebsd] compile-flags: --target powerpc-unknown-freebsd -// [powerpc_unknown_freebsd] needs-llvm-components: powerpc -// revisions: powerpc_unknown_linux_gnu -// [powerpc_unknown_linux_gnu] compile-flags: --target powerpc-unknown-linux-gnu -// [powerpc_unknown_linux_gnu] needs-llvm-components: powerpc -// revisions: powerpc_unknown_linux_gnuspe -// [powerpc_unknown_linux_gnuspe] compile-flags: --target powerpc-unknown-linux-gnuspe -// [powerpc_unknown_linux_gnuspe] needs-llvm-components: powerpc -// revisions: powerpc_unknown_linux_musl -// [powerpc_unknown_linux_musl] compile-flags: --target powerpc-unknown-linux-musl -// [powerpc_unknown_linux_musl] needs-llvm-components: powerpc -// revisions: powerpc_unknown_netbsd -// [powerpc_unknown_netbsd] compile-flags: --target powerpc-unknown-netbsd -// [powerpc_unknown_netbsd] needs-llvm-components: powerpc -// revisions: powerpc_unknown_openbsd -// [powerpc_unknown_openbsd] compile-flags: --target powerpc-unknown-openbsd -// [powerpc_unknown_openbsd] needs-llvm-components: powerpc -// revisions: powerpc_wrs_vxworks -// [powerpc_wrs_vxworks] compile-flags: --target powerpc-wrs-vxworks -// [powerpc_wrs_vxworks] needs-llvm-components: powerpc -// revisions: powerpc_wrs_vxworks_spe -// [powerpc_wrs_vxworks_spe] compile-flags: --target powerpc-wrs-vxworks-spe -// [powerpc_wrs_vxworks_spe] needs-llvm-components: powerpc -// revisions: riscv32gc_unknown_linux_gnu -// [riscv32gc_unknown_linux_gnu] compile-flags: --target riscv32gc-unknown-linux-gnu -// [riscv32gc_unknown_linux_gnu] needs-llvm-components: riscv -// revisions: riscv32gc_unknown_linux_musl -// [riscv32gc_unknown_linux_musl] compile-flags: --target riscv32gc-unknown-linux-musl -// [riscv32gc_unknown_linux_musl] needs-llvm-components: riscv -// revisions: riscv32i_unknown_none_elf -// [riscv32i_unknown_none_elf] compile-flags: --target riscv32i-unknown-none-elf -// [riscv32i_unknown_none_elf] needs-llvm-components: riscv -// revisions: riscv32im_risc0_zkvm_elf -// [riscv32im_risc0_zkvm_elf] compile-flags: --target riscv32im-risc0-zkvm-elf -// [riscv32im_risc0_zkvm_elf] needs-llvm-components: riscv -// revisions: riscv32im_unknown_none_elf -// [riscv32im_unknown_none_elf] compile-flags: --target riscv32im-unknown-none-elf -// [riscv32im_unknown_none_elf] needs-llvm-components: riscv -// revisions: riscv32imac_esp_espidf -// [riscv32imac_esp_espidf] compile-flags: --target riscv32imac-esp-espidf -// [riscv32imac_esp_espidf] needs-llvm-components: riscv -// revisions: riscv32imac_unknown_none_elf -// [riscv32imac_unknown_none_elf] compile-flags: --target riscv32imac-unknown-none-elf -// [riscv32imac_unknown_none_elf] needs-llvm-components: riscv -// revisions: riscv32imac_unknown_xous_elf -// [riscv32imac_unknown_xous_elf] compile-flags: --target riscv32imac-unknown-xous-elf -// [riscv32imac_unknown_xous_elf] needs-llvm-components: riscv -// revisions: riscv32imafc_unknown_none_elf -// [riscv32imafc_unknown_none_elf] compile-flags: --target riscv32imafc-unknown-none-elf -// [riscv32imafc_unknown_none_elf] needs-llvm-components: riscv -// revisions: riscv32imafc_esp_espidf -// [riscv32imafc_esp_espidf] compile-flags: --target riscv32imafc-esp-espidf -// [riscv32imafc_esp_espidf] needs-llvm-components: riscv -// revisions: riscv32imc_esp_espidf -// [riscv32imc_esp_espidf] compile-flags: --target riscv32imc-esp-espidf -// [riscv32imc_esp_espidf] needs-llvm-components: riscv -// revisions: riscv32imc_unknown_none_elf -// [riscv32imc_unknown_none_elf] compile-flags: --target riscv32imc-unknown-none-elf -// [riscv32imc_unknown_none_elf] needs-llvm-components: riscv -// revisions: riscv64_linux_android -// [riscv64_linux_android] compile-flags: --target riscv64-linux-android -// [riscv64_linux_android] needs-llvm-components: riscv -// revisions: riscv64gc_unknown_freebsd -// [riscv64gc_unknown_freebsd] compile-flags: --target riscv64gc-unknown-freebsd -// [riscv64gc_unknown_freebsd] needs-llvm-components: riscv -// revisions: riscv64gc_unknown_fuchsia -// [riscv64gc_unknown_fuchsia] compile-flags: --target riscv64gc-unknown-fuchsia -// [riscv64gc_unknown_fuchsia] needs-llvm-components: riscv -// revisions: riscv64gc_unknown_hermit -// [riscv64gc_unknown_hermit] compile-flags: --target riscv64gc-unknown-hermit -// [riscv64gc_unknown_hermit] needs-llvm-components: riscv -// revisions: riscv64gc_unknown_linux_gnu -// [riscv64gc_unknown_linux_gnu] compile-flags: --target riscv64gc-unknown-linux-gnu -// [riscv64gc_unknown_linux_gnu] needs-llvm-components: riscv -// revisions: riscv64gc_unknown_linux_musl -// [riscv64gc_unknown_linux_musl] compile-flags: --target riscv64gc-unknown-linux-musl -// [riscv64gc_unknown_linux_musl] needs-llvm-components: riscv -// revisions: riscv64gc_unknown_netbsd -// [riscv64gc_unknown_netbsd] compile-flags: --target riscv64gc-unknown-netbsd -// [riscv64gc_unknown_netbsd] needs-llvm-components: riscv -// revisions: riscv64gc_unknown_none_elf -// [riscv64gc_unknown_none_elf] compile-flags: --target riscv64gc-unknown-none-elf -// [riscv64gc_unknown_none_elf] needs-llvm-components: riscv -// revisions: riscv64gc_unknown_openbsd -// [riscv64gc_unknown_openbsd] compile-flags: --target riscv64gc-unknown-openbsd -// [riscv64gc_unknown_openbsd] needs-llvm-components: riscv -// revisions: riscv64imac_unknown_none_elf -// [riscv64imac_unknown_none_elf] compile-flags: --target riscv64imac-unknown-none-elf -// [riscv64imac_unknown_none_elf] needs-llvm-components: riscv -// revisions: s390x_unknown_linux_gnu -// [s390x_unknown_linux_gnu] compile-flags: --target s390x-unknown-linux-gnu -// [s390x_unknown_linux_gnu] needs-llvm-components: systemz -// revisions: s390x_unknown_linux_musl -// [s390x_unknown_linux_musl] compile-flags: --target s390x-unknown-linux-musl -// [s390x_unknown_linux_musl] needs-llvm-components: systemz -// revisions: sparc64_unknown_linux_gnu -// [sparc64_unknown_linux_gnu] compile-flags: --target sparc64-unknown-linux-gnu -// [sparc64_unknown_linux_gnu] needs-llvm-components: sparc -// revisions: sparc64_unknown_netbsd -// [sparc64_unknown_netbsd] compile-flags: --target sparc64-unknown-netbsd -// [sparc64_unknown_netbsd] needs-llvm-components: sparc -// revisions: sparc64_unknown_openbsd -// [sparc64_unknown_openbsd] compile-flags: --target sparc64-unknown-openbsd -// [sparc64_unknown_openbsd] needs-llvm-components: sparc -// revisions: sparc_unknown_linux_gnu -// [sparc_unknown_linux_gnu] compile-flags: --target sparc-unknown-linux-gnu -// [sparc_unknown_linux_gnu] needs-llvm-components: sparc -// revisions: sparc_unknown_none_elf -// [sparc_unknown_none_elf] compile-flags: --target sparc-unknown-none-elf -// [sparc_unknown_none_elf] needs-llvm-components: sparc -// revisions: sparcv9_sun_solaris -// [sparcv9_sun_solaris] compile-flags: --target sparcv9-sun-solaris -// [sparcv9_sun_solaris] needs-llvm-components: sparc -// revisions: thumbv4t_none_eabi -// [thumbv4t_none_eabi] compile-flags: --target thumbv4t-none-eabi -// [thumbv4t_none_eabi] needs-llvm-components: arm -// revisions: thumbv5te_none_eabi -// [thumbv5te_none_eabi] compile-flags: --target thumbv5te-none-eabi -// [thumbv5te_none_eabi] needs-llvm-components: arm -// revisions: thumbv6m_none_eabi -// [thumbv6m_none_eabi] compile-flags: --target thumbv6m-none-eabi -// [thumbv6m_none_eabi] needs-llvm-components: arm -// revisions: thumbv7em_none_eabi -// [thumbv7em_none_eabi] compile-flags: --target thumbv7em-none-eabi -// [thumbv7em_none_eabi] needs-llvm-components: arm -// revisions: thumbv7em_none_eabihf -// [thumbv7em_none_eabihf] compile-flags: --target thumbv7em-none-eabihf -// [thumbv7em_none_eabihf] needs-llvm-components: arm -// revisions: thumbv7m_none_eabi -// [thumbv7m_none_eabi] compile-flags: --target thumbv7m-none-eabi -// [thumbv7m_none_eabi] needs-llvm-components: arm -// revisions: thumbv7neon_linux_androideabi -// [thumbv7neon_linux_androideabi] compile-flags: --target thumbv7neon-linux-androideabi -// [thumbv7neon_linux_androideabi] needs-llvm-components: arm -// revisions: thumbv7neon_unknown_linux_gnueabihf -// [thumbv7neon_unknown_linux_gnueabihf] compile-flags: --target thumbv7neon-unknown-linux-gnueabihf -// [thumbv7neon_unknown_linux_gnueabihf] needs-llvm-components: arm -// revisions: thumbv7neon_unknown_linux_musleabihf -// [thumbv7neon_unknown_linux_musleabihf] compile-flags: --target thumbv7neon-unknown-linux-musleabihf -// [thumbv7neon_unknown_linux_musleabihf] needs-llvm-components: arm -// revisions: thumbv8m_base_none_eabi -// [thumbv8m_base_none_eabi] compile-flags: --target thumbv8m.base-none-eabi -// [thumbv8m_base_none_eabi] needs-llvm-components: arm -// revisions: thumbv8m_main_none_eabi -// [thumbv8m_main_none_eabi] compile-flags: --target thumbv8m.main-none-eabi -// [thumbv8m_main_none_eabi] needs-llvm-components: arm -// revisions: thumbv8m_main_none_eabihf -// [thumbv8m_main_none_eabihf] compile-flags: --target thumbv8m.main-none-eabihf -// [thumbv8m_main_none_eabihf] needs-llvm-components: arm -// revisions: wasm32_unknown_emscripten -// [wasm32_unknown_emscripten] compile-flags: --target wasm32-unknown-emscripten -// [wasm32_unknown_emscripten] needs-llvm-components: webassembly -// revisions: wasm32_unknown_unknown -// [wasm32_unknown_unknown] compile-flags: --target wasm32-unknown-unknown -// [wasm32_unknown_unknown] needs-llvm-components: webassembly -// revisions: wasm32_wasi -// [wasm32_wasi] compile-flags: --target wasm32-wasi -// [wasm32_wasi] needs-llvm-components: webassembly -// revisions: wasm32_wasi_preview1_threads -// [wasm32_wasi_preview1_threads] compile-flags: --target wasm32-wasi-preview1-threads -// [wasm32_wasi_preview1_threads] needs-llvm-components: webassembly -// revisions: wasm64_unknown_unknown -// [wasm64_unknown_unknown] compile-flags: --target wasm64-unknown-unknown -// [wasm64_unknown_unknown] needs-llvm-components: webassembly -// revisions: x86_64_fortanix_unknown_sgx -// [x86_64_fortanix_unknown_sgx] compile-flags: --target x86_64-fortanix-unknown-sgx -// [x86_64_fortanix_unknown_sgx] needs-llvm-components: x86 -// revisions: x86_64_fuchsia -// [x86_64_fuchsia] compile-flags: --target x86_64-fuchsia -// [x86_64_fuchsia] needs-llvm-components: x86 -// revisions: x86_64_linux_android -// [x86_64_linux_android] compile-flags: --target x86_64-linux-android -// [x86_64_linux_android] needs-llvm-components: x86 -// revisions: x86_64_pc_nto_qnx710 -// [x86_64_pc_nto_qnx710] compile-flags: --target x86_64-pc-nto-qnx710 -// [x86_64_pc_nto_qnx710] needs-llvm-components: x86 -// revisions: x86_64_pc_solaris -// [x86_64_pc_solaris] compile-flags: --target x86_64-pc-solaris -// [x86_64_pc_solaris] needs-llvm-components: x86 -// revisions: x86_64_unikraft_linux_musl -// [x86_64_unikraft_linux_musl] compile-flags: --target x86_64-unikraft-linux-musl -// [x86_64_unikraft_linux_musl] needs-llvm-components: x86 -// revisions: x86_64_unknown_dragonfly -// [x86_64_unknown_dragonfly] compile-flags: --target x86_64-unknown-dragonfly -// [x86_64_unknown_dragonfly] needs-llvm-components: x86 -// revisions: x86_64_unknown_freebsd -// [x86_64_unknown_freebsd] compile-flags: --target x86_64-unknown-freebsd -// [x86_64_unknown_freebsd] needs-llvm-components: x86 -// revisions: x86_64_unknown_fuchsia -// [x86_64_unknown_fuchsia] compile-flags: --target x86_64-unknown-fuchsia -// [x86_64_unknown_fuchsia] needs-llvm-components: x86 -// revisions: x86_64_unknown_haiku -// [x86_64_unknown_haiku] compile-flags: --target x86_64-unknown-haiku -// [x86_64_unknown_haiku] needs-llvm-components: x86 -// revisions: x86_64_unknown_hermit -// [x86_64_unknown_hermit] compile-flags: --target x86_64-unknown-hermit -// [x86_64_unknown_hermit] needs-llvm-components: x86 -// revisions: x86_64_unknown_illumos -// [x86_64_unknown_illumos] compile-flags: --target x86_64-unknown-illumos -// [x86_64_unknown_illumos] needs-llvm-components: x86 -// revisions: x86_64_unknown_l4re_uclibc -// [x86_64_unknown_l4re_uclibc] compile-flags: --target x86_64-unknown-l4re-uclibc -// [x86_64_unknown_l4re_uclibc] needs-llvm-components: x86 -// revisions: x86_64_unknown_linux_gnu -// [x86_64_unknown_linux_gnu] compile-flags: --target x86_64-unknown-linux-gnu -// [x86_64_unknown_linux_gnu] needs-llvm-components: x86 -// revisions: x86_64_unknown_linux_gnux32 -// [x86_64_unknown_linux_gnux32] compile-flags: --target x86_64-unknown-linux-gnux32 -// [x86_64_unknown_linux_gnux32] needs-llvm-components: x86 -// revisions: x86_64_unknown_linux_musl -// [x86_64_unknown_linux_musl] compile-flags: --target x86_64-unknown-linux-musl -// [x86_64_unknown_linux_musl] needs-llvm-components: x86 -// revisions: x86_64_unknown_linux_ohos -// [x86_64_unknown_linux_ohos] compile-flags: --target x86_64-unknown-linux-ohos -// [x86_64_unknown_linux_ohos] needs-llvm-components: x86 -// revisions: x86_64_unknown_netbsd -// [x86_64_unknown_netbsd] compile-flags: --target x86_64-unknown-netbsd -// [x86_64_unknown_netbsd] needs-llvm-components: x86 -// revisions: x86_64_unknown_none -// [x86_64_unknown_none] compile-flags: --target x86_64-unknown-none -// [x86_64_unknown_none] needs-llvm-components: x86 -// revisions: x86_64_unknown_openbsd -// [x86_64_unknown_openbsd] compile-flags: --target x86_64-unknown-openbsd -// [x86_64_unknown_openbsd] needs-llvm-components: x86 -// revisions: x86_64_unknown_redox -// [x86_64_unknown_redox] compile-flags: --target x86_64-unknown-redox -// [x86_64_unknown_redox] needs-llvm-components: x86 -// revisions: x86_64_wrs_vxworks -// [x86_64_wrs_vxworks] compile-flags: --target x86_64-wrs-vxworks -// [x86_64_wrs_vxworks] needs-llvm-components: x86 +//@ revisions: hexagon_unknown_linux_musl +//@ [hexagon_unknown_linux_musl] compile-flags: --target hexagon-unknown-linux-musl +//@ [hexagon_unknown_linux_musl] needs-llvm-components: hexagon +//@ revisions: hexagon_unknown_none_elf +//@ [hexagon_unknown_none_elf] compile-flags: --target hexagon-unknown-none-elf +//@ [hexagon_unknown_none_elf] needs-llvm-components: hexagon +//@ revisions: i586_pc_nto_qnx700 +//@ [i586_pc_nto_qnx700] compile-flags: --target i586-pc-nto-qnx700 +//@ [i586_pc_nto_qnx700] needs-llvm-components: x86 +//@ revisions: i586_unknown_linux_gnu +//@ [i586_unknown_linux_gnu] compile-flags: --target i586-unknown-linux-gnu +//@ [i586_unknown_linux_gnu] needs-llvm-components: x86 +//@ revisions: i586_unknown_linux_musl +//@ [i586_unknown_linux_musl] compile-flags: --target i586-unknown-linux-musl +//@ [i586_unknown_linux_musl] needs-llvm-components: x86 +//@ revisions: i586_unknown_netbsd +//@ [i586_unknown_netbsd] compile-flags: --target i586-unknown-netbsd +//@ [i586_unknown_netbsd] needs-llvm-components: x86 +//@ revisions: i686_linux_android +//@ [i686_linux_android] compile-flags: --target i686-linux-android +//@ [i686_linux_android] needs-llvm-components: x86 +//@ revisions: i686_unknown_freebsd +//@ [i686_unknown_freebsd] compile-flags: --target i686-unknown-freebsd +//@ [i686_unknown_freebsd] needs-llvm-components: x86 +//@ revisions: i686_unknown_haiku +//@ [i686_unknown_haiku] compile-flags: --target i686-unknown-haiku +//@ [i686_unknown_haiku] needs-llvm-components: x86 +//@ revisions: i686_unknown_hurd_gnu +//@ [i686_unknown_hurd_gnu] compile-flags: --target i686-unknown-hurd-gnu +//@ [i686_unknown_hurd_gnu] needs-llvm-components: x86 +//@ revisions: i686_unknown_linux_gnu +//@ [i686_unknown_linux_gnu] compile-flags: --target i686-unknown-linux-gnu +//@ [i686_unknown_linux_gnu] needs-llvm-components: x86 +//@ revisions: i686_unknown_linux_musl +//@ [i686_unknown_linux_musl] compile-flags: --target i686-unknown-linux-musl +//@ [i686_unknown_linux_musl] needs-llvm-components: x86 +//@ revisions: i686_unknown_netbsd +//@ [i686_unknown_netbsd] compile-flags: --target i686-unknown-netbsd +//@ [i686_unknown_netbsd] needs-llvm-components: x86 +//@ revisions: i686_unknown_openbsd +//@ [i686_unknown_openbsd] compile-flags: --target i686-unknown-openbsd +//@ [i686_unknown_openbsd] needs-llvm-components: x86 +//@ revisions: i686_wrs_vxworks +//@ [i686_wrs_vxworks] compile-flags: --target i686-wrs-vxworks +//@ [i686_wrs_vxworks] needs-llvm-components: x86 +//@ revisions: loongarch64_unknown_linux_gnu +//@ [loongarch64_unknown_linux_gnu] compile-flags: --target loongarch64-unknown-linux-gnu +//@ [loongarch64_unknown_linux_gnu] needs-llvm-components: loongarch +//@ revisions: loongarch64_unknown_none +//@ [loongarch64_unknown_none] compile-flags: --target loongarch64-unknown-none +//@ [loongarch64_unknown_none] needs-llvm-components: loongarch +//@ revisions: loongarch64_unknown_none_softfloat +//@ [loongarch64_unknown_none_softfloat] compile-flags: --target loongarch64-unknown-none-softfloat +//@ [loongarch64_unknown_none_softfloat] needs-llvm-components: loongarch +//@ revisions: m68k_unknown_linux_gnu +//@ [m68k_unknown_linux_gnu] compile-flags: --target m68k-unknown-linux-gnu +//@ [m68k_unknown_linux_gnu] needs-llvm-components: m68k +//@ revisions: mips64_openwrt_linux_musl +//@ [mips64_openwrt_linux_musl] compile-flags: --target mips64-openwrt-linux-musl +//@ [mips64_openwrt_linux_musl] needs-llvm-components: mips +//@ revisions: mips64_unknown_linux_gnuabi64 +//@ [mips64_unknown_linux_gnuabi64] compile-flags: --target mips64-unknown-linux-gnuabi64 +//@ [mips64_unknown_linux_gnuabi64] needs-llvm-components: mips +//@ revisions: mips64_unknown_linux_muslabi64 +//@ [mips64_unknown_linux_muslabi64] compile-flags: --target mips64-unknown-linux-muslabi64 +//@ [mips64_unknown_linux_muslabi64] needs-llvm-components: mips +//@ revisions: mips64el_unknown_linux_gnuabi64 +//@ [mips64el_unknown_linux_gnuabi64] compile-flags: --target mips64el-unknown-linux-gnuabi64 +//@ [mips64el_unknown_linux_gnuabi64] needs-llvm-components: mips +//@ revisions: mips64el_unknown_linux_muslabi64 +//@ [mips64el_unknown_linux_muslabi64] compile-flags: --target mips64el-unknown-linux-muslabi64 +//@ [mips64el_unknown_linux_muslabi64] needs-llvm-components: mips +//@ revisions: mips_unknown_linux_gnu +//@ [mips_unknown_linux_gnu] compile-flags: --target mips-unknown-linux-gnu +//@ [mips_unknown_linux_gnu] needs-llvm-components: mips +//@ revisions: mips_unknown_linux_musl +//@ [mips_unknown_linux_musl] compile-flags: --target mips-unknown-linux-musl +//@ [mips_unknown_linux_musl] needs-llvm-components: mips +//@ revisions: mips_unknown_linux_uclibc +//@ [mips_unknown_linux_uclibc] compile-flags: --target mips-unknown-linux-uclibc +//@ [mips_unknown_linux_uclibc] needs-llvm-components: mips +//@ revisions: mipsel_sony_psp +//@ [mipsel_sony_psp] compile-flags: --target mipsel-sony-psp +//@ [mipsel_sony_psp] needs-llvm-components: mips +//@ revisions: mipsel_sony_psx +//@ [mipsel_sony_psx] compile-flags: --target mipsel-sony-psx +//@ [mipsel_sony_psx] needs-llvm-components: mips +//@ revisions: mipsel_unknown_linux_gnu +//@ [mipsel_unknown_linux_gnu] compile-flags: --target mipsel-unknown-linux-gnu +//@ [mipsel_unknown_linux_gnu] needs-llvm-components: mips +//@ revisions: mipsel_unknown_linux_musl +//@ [mipsel_unknown_linux_musl] compile-flags: --target mipsel-unknown-linux-musl +//@ [mipsel_unknown_linux_musl] needs-llvm-components: mips +//@ revisions: mipsel_unknown_linux_uclibc +//@ [mipsel_unknown_linux_uclibc] compile-flags: --target mipsel-unknown-linux-uclibc +//@ [mipsel_unknown_linux_uclibc] needs-llvm-components: mips +//@ revisions: mipsel_unknown_netbsd +//@ [mipsel_unknown_netbsd] compile-flags: --target mipsel-unknown-netbsd +//@ [mipsel_unknown_netbsd] needs-llvm-components: mips +//@ revisions: mipsel_unknown_none +//@ [mipsel_unknown_none] compile-flags: --target mipsel-unknown-none +//@ [mipsel_unknown_none] needs-llvm-components: mips +//@ revisions: mipsisa32r6_unknown_linux_gnu +//@ [mipsisa32r6_unknown_linux_gnu] compile-flags: --target mipsisa32r6-unknown-linux-gnu +//@ [mipsisa32r6_unknown_linux_gnu] needs-llvm-components: mips +//@ revisions: mipsisa32r6el_unknown_linux_gnu +//@ [mipsisa32r6el_unknown_linux_gnu] compile-flags: --target mipsisa32r6el-unknown-linux-gnu +//@ [mipsisa32r6el_unknown_linux_gnu] needs-llvm-components: mips +//@ revisions: mipsisa64r6_unknown_linux_gnuabi64 +//@ [mipsisa64r6_unknown_linux_gnuabi64] compile-flags: --target mipsisa64r6-unknown-linux-gnuabi64 +//@ [mipsisa64r6_unknown_linux_gnuabi64] needs-llvm-components: mips +//@ revisions: mipsisa64r6el_unknown_linux_gnuabi64 +//@ [mipsisa64r6el_unknown_linux_gnuabi64] compile-flags: --target mipsisa64r6el-unknown-linux-gnuabi64 +//@ [mipsisa64r6el_unknown_linux_gnuabi64] needs-llvm-components: mips +//@ revisions: msp430_none_elf +//@ [msp430_none_elf] compile-flags: --target msp430-none-elf +//@ [msp430_none_elf] needs-llvm-components: msp430 +//@ revisions: powerpc64_unknown_freebsd +//@ [powerpc64_unknown_freebsd] compile-flags: --target powerpc64-unknown-freebsd +//@ [powerpc64_unknown_freebsd] needs-llvm-components: powerpc +//@ revisions: powerpc64_unknown_linux_gnu +//@ [powerpc64_unknown_linux_gnu] compile-flags: --target powerpc64-unknown-linux-gnu +//@ [powerpc64_unknown_linux_gnu] needs-llvm-components: powerpc +//@ revisions: powerpc64_unknown_linux_musl +//@ [powerpc64_unknown_linux_musl] compile-flags: --target powerpc64-unknown-linux-musl +//@ [powerpc64_unknown_linux_musl] needs-llvm-components: powerpc +//@ revisions: powerpc64_unknown_openbsd +//@ [powerpc64_unknown_openbsd] compile-flags: --target powerpc64-unknown-openbsd +//@ [powerpc64_unknown_openbsd] needs-llvm-components: powerpc +//@ revisions: powerpc64_wrs_vxworks +//@ [powerpc64_wrs_vxworks] compile-flags: --target powerpc64-wrs-vxworks +//@ [powerpc64_wrs_vxworks] needs-llvm-components: powerpc +//@ revisions: powerpc64le_unknown_freebsd +//@ [powerpc64le_unknown_freebsd] compile-flags: --target powerpc64le-unknown-freebsd +//@ [powerpc64le_unknown_freebsd] needs-llvm-components: powerpc +//@ revisions: powerpc64le_unknown_linux_gnu +//@ [powerpc64le_unknown_linux_gnu] compile-flags: --target powerpc64le-unknown-linux-gnu +//@ [powerpc64le_unknown_linux_gnu] needs-llvm-components: powerpc +//@ revisions: powerpc64le_unknown_linux_musl +//@ [powerpc64le_unknown_linux_musl] compile-flags: --target powerpc64le-unknown-linux-musl +//@ [powerpc64le_unknown_linux_musl] needs-llvm-components: powerpc +//@ revisions: powerpc_unknown_freebsd +//@ [powerpc_unknown_freebsd] compile-flags: --target powerpc-unknown-freebsd +//@ [powerpc_unknown_freebsd] needs-llvm-components: powerpc +//@ revisions: powerpc_unknown_linux_gnu +//@ [powerpc_unknown_linux_gnu] compile-flags: --target powerpc-unknown-linux-gnu +//@ [powerpc_unknown_linux_gnu] needs-llvm-components: powerpc +//@ revisions: powerpc_unknown_linux_gnuspe +//@ [powerpc_unknown_linux_gnuspe] compile-flags: --target powerpc-unknown-linux-gnuspe +//@ [powerpc_unknown_linux_gnuspe] needs-llvm-components: powerpc +//@ revisions: powerpc_unknown_linux_musl +//@ [powerpc_unknown_linux_musl] compile-flags: --target powerpc-unknown-linux-musl +//@ [powerpc_unknown_linux_musl] needs-llvm-components: powerpc +//@ revisions: powerpc_unknown_netbsd +//@ [powerpc_unknown_netbsd] compile-flags: --target powerpc-unknown-netbsd +//@ [powerpc_unknown_netbsd] needs-llvm-components: powerpc +//@ revisions: powerpc_unknown_openbsd +//@ [powerpc_unknown_openbsd] compile-flags: --target powerpc-unknown-openbsd +//@ [powerpc_unknown_openbsd] needs-llvm-components: powerpc +//@ revisions: powerpc_wrs_vxworks +//@ [powerpc_wrs_vxworks] compile-flags: --target powerpc-wrs-vxworks +//@ [powerpc_wrs_vxworks] needs-llvm-components: powerpc +//@ revisions: powerpc_wrs_vxworks_spe +//@ [powerpc_wrs_vxworks_spe] compile-flags: --target powerpc-wrs-vxworks-spe +//@ [powerpc_wrs_vxworks_spe] needs-llvm-components: powerpc +//@ revisions: riscv32gc_unknown_linux_gnu +//@ [riscv32gc_unknown_linux_gnu] compile-flags: --target riscv32gc-unknown-linux-gnu +//@ [riscv32gc_unknown_linux_gnu] needs-llvm-components: riscv +//@ revisions: riscv32gc_unknown_linux_musl +//@ [riscv32gc_unknown_linux_musl] compile-flags: --target riscv32gc-unknown-linux-musl +//@ [riscv32gc_unknown_linux_musl] needs-llvm-components: riscv +//@ revisions: riscv32i_unknown_none_elf +//@ [riscv32i_unknown_none_elf] compile-flags: --target riscv32i-unknown-none-elf +//@ [riscv32i_unknown_none_elf] needs-llvm-components: riscv +//@ revisions: riscv32im_risc0_zkvm_elf +//@ [riscv32im_risc0_zkvm_elf] compile-flags: --target riscv32im-risc0-zkvm-elf +//@ [riscv32im_risc0_zkvm_elf] needs-llvm-components: riscv +//@ revisions: riscv32im_unknown_none_elf +//@ [riscv32im_unknown_none_elf] compile-flags: --target riscv32im-unknown-none-elf +//@ [riscv32im_unknown_none_elf] needs-llvm-components: riscv +//@ revisions: riscv32imac_esp_espidf +//@ [riscv32imac_esp_espidf] compile-flags: --target riscv32imac-esp-espidf +//@ [riscv32imac_esp_espidf] needs-llvm-components: riscv +//@ revisions: riscv32imac_unknown_none_elf +//@ [riscv32imac_unknown_none_elf] compile-flags: --target riscv32imac-unknown-none-elf +//@ [riscv32imac_unknown_none_elf] needs-llvm-components: riscv +//@ revisions: riscv32imac_unknown_xous_elf +//@ [riscv32imac_unknown_xous_elf] compile-flags: --target riscv32imac-unknown-xous-elf +//@ [riscv32imac_unknown_xous_elf] needs-llvm-components: riscv +//@ revisions: riscv32imafc_unknown_none_elf +//@ [riscv32imafc_unknown_none_elf] compile-flags: --target riscv32imafc-unknown-none-elf +//@ [riscv32imafc_unknown_none_elf] needs-llvm-components: riscv +//@ revisions: riscv32imafc_esp_espidf +//@ [riscv32imafc_esp_espidf] compile-flags: --target riscv32imafc-esp-espidf +//@ [riscv32imafc_esp_espidf] needs-llvm-components: riscv +//@ revisions: riscv32imc_esp_espidf +//@ [riscv32imc_esp_espidf] compile-flags: --target riscv32imc-esp-espidf +//@ [riscv32imc_esp_espidf] needs-llvm-components: riscv +//@ revisions: riscv32imc_unknown_none_elf +//@ [riscv32imc_unknown_none_elf] compile-flags: --target riscv32imc-unknown-none-elf +//@ [riscv32imc_unknown_none_elf] needs-llvm-components: riscv +//@ revisions: riscv64_linux_android +//@ [riscv64_linux_android] compile-flags: --target riscv64-linux-android +//@ [riscv64_linux_android] needs-llvm-components: riscv +//@ revisions: riscv64gc_unknown_freebsd +//@ [riscv64gc_unknown_freebsd] compile-flags: --target riscv64gc-unknown-freebsd +//@ [riscv64gc_unknown_freebsd] needs-llvm-components: riscv +//@ revisions: riscv64gc_unknown_fuchsia +//@ [riscv64gc_unknown_fuchsia] compile-flags: --target riscv64gc-unknown-fuchsia +//@ [riscv64gc_unknown_fuchsia] needs-llvm-components: riscv +//@ revisions: riscv64gc_unknown_hermit +//@ [riscv64gc_unknown_hermit] compile-flags: --target riscv64gc-unknown-hermit +//@ [riscv64gc_unknown_hermit] needs-llvm-components: riscv +//@ revisions: riscv64gc_unknown_linux_gnu +//@ [riscv64gc_unknown_linux_gnu] compile-flags: --target riscv64gc-unknown-linux-gnu +//@ [riscv64gc_unknown_linux_gnu] needs-llvm-components: riscv +//@ revisions: riscv64gc_unknown_linux_musl +//@ [riscv64gc_unknown_linux_musl] compile-flags: --target riscv64gc-unknown-linux-musl +//@ [riscv64gc_unknown_linux_musl] needs-llvm-components: riscv +//@ revisions: riscv64gc_unknown_netbsd +//@ [riscv64gc_unknown_netbsd] compile-flags: --target riscv64gc-unknown-netbsd +//@ [riscv64gc_unknown_netbsd] needs-llvm-components: riscv +//@ revisions: riscv64gc_unknown_none_elf +//@ [riscv64gc_unknown_none_elf] compile-flags: --target riscv64gc-unknown-none-elf +//@ [riscv64gc_unknown_none_elf] needs-llvm-components: riscv +//@ revisions: riscv64gc_unknown_openbsd +//@ [riscv64gc_unknown_openbsd] compile-flags: --target riscv64gc-unknown-openbsd +//@ [riscv64gc_unknown_openbsd] needs-llvm-components: riscv +//@ revisions: riscv64imac_unknown_none_elf +//@ [riscv64imac_unknown_none_elf] compile-flags: --target riscv64imac-unknown-none-elf +//@ [riscv64imac_unknown_none_elf] needs-llvm-components: riscv +//@ revisions: s390x_unknown_linux_gnu +//@ [s390x_unknown_linux_gnu] compile-flags: --target s390x-unknown-linux-gnu +//@ [s390x_unknown_linux_gnu] needs-llvm-components: systemz +//@ revisions: s390x_unknown_linux_musl +//@ [s390x_unknown_linux_musl] compile-flags: --target s390x-unknown-linux-musl +//@ [s390x_unknown_linux_musl] needs-llvm-components: systemz +//@ revisions: sparc64_unknown_linux_gnu +//@ [sparc64_unknown_linux_gnu] compile-flags: --target sparc64-unknown-linux-gnu +//@ [sparc64_unknown_linux_gnu] needs-llvm-components: sparc +//@ revisions: sparc64_unknown_netbsd +//@ [sparc64_unknown_netbsd] compile-flags: --target sparc64-unknown-netbsd +//@ [sparc64_unknown_netbsd] needs-llvm-components: sparc +//@ revisions: sparc64_unknown_openbsd +//@ [sparc64_unknown_openbsd] compile-flags: --target sparc64-unknown-openbsd +//@ [sparc64_unknown_openbsd] needs-llvm-components: sparc +//@ revisions: sparc_unknown_linux_gnu +//@ [sparc_unknown_linux_gnu] compile-flags: --target sparc-unknown-linux-gnu +//@ [sparc_unknown_linux_gnu] needs-llvm-components: sparc +//@ revisions: sparc_unknown_none_elf +//@ [sparc_unknown_none_elf] compile-flags: --target sparc-unknown-none-elf +//@ [sparc_unknown_none_elf] needs-llvm-components: sparc +//@ revisions: sparcv9_sun_solaris +//@ [sparcv9_sun_solaris] compile-flags: --target sparcv9-sun-solaris +//@ [sparcv9_sun_solaris] needs-llvm-components: sparc +//@ revisions: thumbv4t_none_eabi +//@ [thumbv4t_none_eabi] compile-flags: --target thumbv4t-none-eabi +//@ [thumbv4t_none_eabi] needs-llvm-components: arm +//@ revisions: thumbv5te_none_eabi +//@ [thumbv5te_none_eabi] compile-flags: --target thumbv5te-none-eabi +//@ [thumbv5te_none_eabi] needs-llvm-components: arm +//@ revisions: thumbv6m_none_eabi +//@ [thumbv6m_none_eabi] compile-flags: --target thumbv6m-none-eabi +//@ [thumbv6m_none_eabi] needs-llvm-components: arm +//@ revisions: thumbv7em_none_eabi +//@ [thumbv7em_none_eabi] compile-flags: --target thumbv7em-none-eabi +//@ [thumbv7em_none_eabi] needs-llvm-components: arm +//@ revisions: thumbv7em_none_eabihf +//@ [thumbv7em_none_eabihf] compile-flags: --target thumbv7em-none-eabihf +//@ [thumbv7em_none_eabihf] needs-llvm-components: arm +//@ revisions: thumbv7m_none_eabi +//@ [thumbv7m_none_eabi] compile-flags: --target thumbv7m-none-eabi +//@ [thumbv7m_none_eabi] needs-llvm-components: arm +//@ revisions: thumbv7neon_linux_androideabi +//@ [thumbv7neon_linux_androideabi] compile-flags: --target thumbv7neon-linux-androideabi +//@ [thumbv7neon_linux_androideabi] needs-llvm-components: arm +//@ revisions: thumbv7neon_unknown_linux_gnueabihf +//@ [thumbv7neon_unknown_linux_gnueabihf] compile-flags: --target thumbv7neon-unknown-linux-gnueabihf +//@ [thumbv7neon_unknown_linux_gnueabihf] needs-llvm-components: arm +//@ revisions: thumbv7neon_unknown_linux_musleabihf +//@ [thumbv7neon_unknown_linux_musleabihf] compile-flags: --target thumbv7neon-unknown-linux-musleabihf +//@ [thumbv7neon_unknown_linux_musleabihf] needs-llvm-components: arm +//@ revisions: thumbv8m_base_none_eabi +//@ [thumbv8m_base_none_eabi] compile-flags: --target thumbv8m.base-none-eabi +//@ [thumbv8m_base_none_eabi] needs-llvm-components: arm +//@ revisions: thumbv8m_main_none_eabi +//@ [thumbv8m_main_none_eabi] compile-flags: --target thumbv8m.main-none-eabi +//@ [thumbv8m_main_none_eabi] needs-llvm-components: arm +//@ revisions: thumbv8m_main_none_eabihf +//@ [thumbv8m_main_none_eabihf] compile-flags: --target thumbv8m.main-none-eabihf +//@ [thumbv8m_main_none_eabihf] needs-llvm-components: arm +//@ revisions: wasm32_unknown_emscripten +//@ [wasm32_unknown_emscripten] compile-flags: --target wasm32-unknown-emscripten +//@ [wasm32_unknown_emscripten] needs-llvm-components: webassembly +//@ revisions: wasm32_unknown_unknown +//@ [wasm32_unknown_unknown] compile-flags: --target wasm32-unknown-unknown +//@ [wasm32_unknown_unknown] needs-llvm-components: webassembly +//@ revisions: wasm32_wasi +//@ [wasm32_wasi] compile-flags: --target wasm32-wasi +//@ [wasm32_wasi] needs-llvm-components: webassembly +//@ revisions: wasm32_wasi_preview1_threads +//@ [wasm32_wasi_preview1_threads] compile-flags: --target wasm32-wasi-preview1-threads +//@ [wasm32_wasi_preview1_threads] needs-llvm-components: webassembly +//@ revisions: wasm64_unknown_unknown +//@ [wasm64_unknown_unknown] compile-flags: --target wasm64-unknown-unknown +//@ [wasm64_unknown_unknown] needs-llvm-components: webassembly +//@ revisions: x86_64_fortanix_unknown_sgx +//@ [x86_64_fortanix_unknown_sgx] compile-flags: --target x86_64-fortanix-unknown-sgx +//@ [x86_64_fortanix_unknown_sgx] needs-llvm-components: x86 +//@ revisions: x86_64_fuchsia +//@ [x86_64_fuchsia] compile-flags: --target x86_64-fuchsia +//@ [x86_64_fuchsia] needs-llvm-components: x86 +//@ revisions: x86_64_linux_android +//@ [x86_64_linux_android] compile-flags: --target x86_64-linux-android +//@ [x86_64_linux_android] needs-llvm-components: x86 +//@ revisions: x86_64_pc_nto_qnx710 +//@ [x86_64_pc_nto_qnx710] compile-flags: --target x86_64-pc-nto-qnx710 +//@ [x86_64_pc_nto_qnx710] needs-llvm-components: x86 +//@ revisions: x86_64_pc_solaris +//@ [x86_64_pc_solaris] compile-flags: --target x86_64-pc-solaris +//@ [x86_64_pc_solaris] needs-llvm-components: x86 +//@ revisions: x86_64_unikraft_linux_musl +//@ [x86_64_unikraft_linux_musl] compile-flags: --target x86_64-unikraft-linux-musl +//@ [x86_64_unikraft_linux_musl] needs-llvm-components: x86 +//@ revisions: x86_64_unknown_dragonfly +//@ [x86_64_unknown_dragonfly] compile-flags: --target x86_64-unknown-dragonfly +//@ [x86_64_unknown_dragonfly] needs-llvm-components: x86 +//@ revisions: x86_64_unknown_freebsd +//@ [x86_64_unknown_freebsd] compile-flags: --target x86_64-unknown-freebsd +//@ [x86_64_unknown_freebsd] needs-llvm-components: x86 +//@ revisions: x86_64_unknown_fuchsia +//@ [x86_64_unknown_fuchsia] compile-flags: --target x86_64-unknown-fuchsia +//@ [x86_64_unknown_fuchsia] needs-llvm-components: x86 +//@ revisions: x86_64_unknown_haiku +//@ [x86_64_unknown_haiku] compile-flags: --target x86_64-unknown-haiku +//@ [x86_64_unknown_haiku] needs-llvm-components: x86 +//@ revisions: x86_64_unknown_hermit +//@ [x86_64_unknown_hermit] compile-flags: --target x86_64-unknown-hermit +//@ [x86_64_unknown_hermit] needs-llvm-components: x86 +//@ revisions: x86_64_unknown_illumos +//@ [x86_64_unknown_illumos] compile-flags: --target x86_64-unknown-illumos +//@ [x86_64_unknown_illumos] needs-llvm-components: x86 +//@ revisions: x86_64_unknown_l4re_uclibc +//@ [x86_64_unknown_l4re_uclibc] compile-flags: --target x86_64-unknown-l4re-uclibc +//@ [x86_64_unknown_l4re_uclibc] needs-llvm-components: x86 +//@ revisions: x86_64_unknown_linux_gnu +//@ [x86_64_unknown_linux_gnu] compile-flags: --target x86_64-unknown-linux-gnu +//@ [x86_64_unknown_linux_gnu] needs-llvm-components: x86 +//@ revisions: x86_64_unknown_linux_gnux32 +//@ [x86_64_unknown_linux_gnux32] compile-flags: --target x86_64-unknown-linux-gnux32 +//@ [x86_64_unknown_linux_gnux32] needs-llvm-components: x86 +//@ revisions: x86_64_unknown_linux_musl +//@ [x86_64_unknown_linux_musl] compile-flags: --target x86_64-unknown-linux-musl +//@ [x86_64_unknown_linux_musl] needs-llvm-components: x86 +//@ revisions: x86_64_unknown_linux_ohos +//@ [x86_64_unknown_linux_ohos] compile-flags: --target x86_64-unknown-linux-ohos +//@ [x86_64_unknown_linux_ohos] needs-llvm-components: x86 +//@ revisions: x86_64_unknown_netbsd +//@ [x86_64_unknown_netbsd] compile-flags: --target x86_64-unknown-netbsd +//@ [x86_64_unknown_netbsd] needs-llvm-components: x86 +//@ revisions: x86_64_unknown_none +//@ [x86_64_unknown_none] compile-flags: --target x86_64-unknown-none +//@ [x86_64_unknown_none] needs-llvm-components: x86 +//@ revisions: x86_64_unknown_openbsd +//@ [x86_64_unknown_openbsd] compile-flags: --target x86_64-unknown-openbsd +//@ [x86_64_unknown_openbsd] needs-llvm-components: x86 +//@ revisions: x86_64_unknown_redox +//@ [x86_64_unknown_redox] compile-flags: --target x86_64-unknown-redox +//@ [x86_64_unknown_redox] needs-llvm-components: x86 +//@ revisions: x86_64_wrs_vxworks +//@ [x86_64_wrs_vxworks] compile-flags: --target x86_64-wrs-vxworks +//@ [x86_64_wrs_vxworks] needs-llvm-components: x86 // Sanity-check that each target can produce assembly code. diff --git a/tests/assembly/targets/targets-macho.rs b/tests/assembly/targets/targets-macho.rs index ead9ccfc8e74..bbdafb76e5a9 100644 --- a/tests/assembly/targets/targets-macho.rs +++ b/tests/assembly/targets/targets-macho.rs @@ -1,68 +1,68 @@ -// assembly-output: emit-asm +//@ assembly-output: emit-asm // ignore-tidy-linelength -// revisions: aarch64_apple_darwin -// [aarch64_apple_darwin] compile-flags: --target aarch64-apple-darwin -// [aarch64_apple_darwin] needs-llvm-components: aarch64 -// revisions: aarch64_apple_ios -// [aarch64_apple_ios] compile-flags: --target aarch64-apple-ios -// [aarch64_apple_ios] needs-llvm-components: aarch64 -// revisions: aarch64_apple_ios_macabi -// [aarch64_apple_ios_macabi] compile-flags: --target aarch64-apple-ios-macabi -// [aarch64_apple_ios_macabi] needs-llvm-components: aarch64 -// revisions: aarch64_apple_ios_sim -// [aarch64_apple_ios_sim] compile-flags: --target aarch64-apple-ios-sim -// [aarch64_apple_ios_sim] needs-llvm-components: aarch64 -// revisions: aarch64_apple_tvos -// [aarch64_apple_tvos] compile-flags: --target aarch64-apple-tvos -// [aarch64_apple_tvos] needs-llvm-components: aarch64 -// revisions: aarch64_apple_tvos_sim -// [aarch64_apple_tvos_sim] compile-flags: --target aarch64-apple-tvos-sim -// [aarch64_apple_tvos_sim] needs-llvm-components: aarch64 -// revisions: aarch64_apple_watchos -// [aarch64_apple_watchos] compile-flags: --target aarch64-apple-watchos -// [aarch64_apple_watchos] needs-llvm-components: aarch64 -// revisions: aarch64_apple_watchos_sim -// [aarch64_apple_watchos_sim] compile-flags: --target aarch64-apple-watchos-sim -// [aarch64_apple_watchos_sim] needs-llvm-components: aarch64 -// revisions: arm64_32_apple_watchos -// [arm64_32_apple_watchos] compile-flags: --target arm64_32-apple-watchos -// [arm64_32_apple_watchos] needs-llvm-components: aarch64 -// revisions: arm64e_apple_darwin -// [arm64e_apple_darwin] compile-flags: --target arm64e-apple-darwin -// [arm64e_apple_darwin] needs-llvm-components: aarch64 -// revisions: arm64e_apple_ios -// [arm64e_apple_ios] compile-flags: --target arm64e-apple-ios -// [arm64e_apple_ios] needs-llvm-components: aarch64 -// revisions: armv7k_apple_watchos -// [armv7k_apple_watchos] compile-flags: --target armv7k-apple-watchos -// [armv7k_apple_watchos] needs-llvm-components: arm -// revisions: armv7s_apple_ios -// [armv7s_apple_ios] compile-flags: --target armv7s-apple-ios -// [armv7s_apple_ios] needs-llvm-components: arm -// revisions: i386_apple_ios -// [i386_apple_ios] compile-flags: --target i386-apple-ios -// [i386_apple_ios] needs-llvm-components: x86 -// revisions: i686_apple_darwin -// [i686_apple_darwin] compile-flags: --target i686-apple-darwin -// [i686_apple_darwin] needs-llvm-components: x86 -// revisions: x86_64_apple_darwin -// [x86_64_apple_darwin] compile-flags: --target x86_64-apple-darwin -// [x86_64_apple_darwin] needs-llvm-components: x86 -// revisions: x86_64_apple_ios -// [x86_64_apple_ios] compile-flags: --target x86_64-apple-ios -// [x86_64_apple_ios] needs-llvm-components: x86 -// revisions: x86_64_apple_ios_macabi -// [x86_64_apple_ios_macabi] compile-flags: --target x86_64-apple-ios-macabi -// [x86_64_apple_ios_macabi] needs-llvm-components: x86 -// revisions: x86_64_apple_tvos -// [x86_64_apple_tvos] compile-flags: --target x86_64-apple-tvos -// [x86_64_apple_tvos] needs-llvm-components: x86 -// revisions: x86_64_apple_watchos_sim -// [x86_64_apple_watchos_sim] compile-flags: --target x86_64-apple-watchos-sim -// [x86_64_apple_watchos_sim] needs-llvm-components: x86 -// revisions: x86_64h_apple_darwin -// [x86_64h_apple_darwin] compile-flags: --target x86_64h-apple-darwin -// [x86_64h_apple_darwin] needs-llvm-components: x86 +//@ revisions: aarch64_apple_darwin +//@ [aarch64_apple_darwin] compile-flags: --target aarch64-apple-darwin +//@ [aarch64_apple_darwin] needs-llvm-components: aarch64 +//@ revisions: aarch64_apple_ios +//@ [aarch64_apple_ios] compile-flags: --target aarch64-apple-ios +//@ [aarch64_apple_ios] needs-llvm-components: aarch64 +//@ revisions: aarch64_apple_ios_macabi +//@ [aarch64_apple_ios_macabi] compile-flags: --target aarch64-apple-ios-macabi +//@ [aarch64_apple_ios_macabi] needs-llvm-components: aarch64 +//@ revisions: aarch64_apple_ios_sim +//@ [aarch64_apple_ios_sim] compile-flags: --target aarch64-apple-ios-sim +//@ [aarch64_apple_ios_sim] needs-llvm-components: aarch64 +//@ revisions: aarch64_apple_tvos +//@ [aarch64_apple_tvos] compile-flags: --target aarch64-apple-tvos +//@ [aarch64_apple_tvos] needs-llvm-components: aarch64 +//@ revisions: aarch64_apple_tvos_sim +//@ [aarch64_apple_tvos_sim] compile-flags: --target aarch64-apple-tvos-sim +//@ [aarch64_apple_tvos_sim] needs-llvm-components: aarch64 +//@ revisions: aarch64_apple_watchos +//@ [aarch64_apple_watchos] compile-flags: --target aarch64-apple-watchos +//@ [aarch64_apple_watchos] needs-llvm-components: aarch64 +//@ revisions: aarch64_apple_watchos_sim +//@ [aarch64_apple_watchos_sim] compile-flags: --target aarch64-apple-watchos-sim +//@ [aarch64_apple_watchos_sim] needs-llvm-components: aarch64 +//@ revisions: arm64_32_apple_watchos +//@ [arm64_32_apple_watchos] compile-flags: --target arm64_32-apple-watchos +//@ [arm64_32_apple_watchos] needs-llvm-components: aarch64 +//@ revisions: arm64e_apple_darwin +//@ [arm64e_apple_darwin] compile-flags: --target arm64e-apple-darwin +//@ [arm64e_apple_darwin] needs-llvm-components: aarch64 +//@ revisions: arm64e_apple_ios +//@ [arm64e_apple_ios] compile-flags: --target arm64e-apple-ios +//@ [arm64e_apple_ios] needs-llvm-components: aarch64 +//@ revisions: armv7k_apple_watchos +//@ [armv7k_apple_watchos] compile-flags: --target armv7k-apple-watchos +//@ [armv7k_apple_watchos] needs-llvm-components: arm +//@ revisions: armv7s_apple_ios +//@ [armv7s_apple_ios] compile-flags: --target armv7s-apple-ios +//@ [armv7s_apple_ios] needs-llvm-components: arm +//@ revisions: i386_apple_ios +//@ [i386_apple_ios] compile-flags: --target i386-apple-ios +//@ [i386_apple_ios] needs-llvm-components: x86 +//@ revisions: i686_apple_darwin +//@ [i686_apple_darwin] compile-flags: --target i686-apple-darwin +//@ [i686_apple_darwin] needs-llvm-components: x86 +//@ revisions: x86_64_apple_darwin +//@ [x86_64_apple_darwin] compile-flags: --target x86_64-apple-darwin +//@ [x86_64_apple_darwin] needs-llvm-components: x86 +//@ revisions: x86_64_apple_ios +//@ [x86_64_apple_ios] compile-flags: --target x86_64-apple-ios +//@ [x86_64_apple_ios] needs-llvm-components: x86 +//@ revisions: x86_64_apple_ios_macabi +//@ [x86_64_apple_ios_macabi] compile-flags: --target x86_64-apple-ios-macabi +//@ [x86_64_apple_ios_macabi] needs-llvm-components: x86 +//@ revisions: x86_64_apple_tvos +//@ [x86_64_apple_tvos] compile-flags: --target x86_64-apple-tvos +//@ [x86_64_apple_tvos] needs-llvm-components: x86 +//@ revisions: x86_64_apple_watchos_sim +//@ [x86_64_apple_watchos_sim] compile-flags: --target x86_64-apple-watchos-sim +//@ [x86_64_apple_watchos_sim] needs-llvm-components: x86 +//@ revisions: x86_64h_apple_darwin +//@ [x86_64h_apple_darwin] compile-flags: --target x86_64h-apple-darwin +//@ [x86_64h_apple_darwin] needs-llvm-components: x86 // Sanity-check that each target can produce assembly code. diff --git a/tests/assembly/targets/targets-nvptx.rs b/tests/assembly/targets/targets-nvptx.rs index 063342304000..9048191affa1 100644 --- a/tests/assembly/targets/targets-nvptx.rs +++ b/tests/assembly/targets/targets-nvptx.rs @@ -1,8 +1,8 @@ -// assembly-output: emit-asm +//@ assembly-output: emit-asm // ignore-tidy-linelength -// revisions: nvptx64_nvidia_cuda -// [nvptx64_nvidia_cuda] compile-flags: --target nvptx64-nvidia-cuda -// [nvptx64_nvidia_cuda] needs-llvm-components: nvptx +//@ revisions: nvptx64_nvidia_cuda +//@ [nvptx64_nvidia_cuda] compile-flags: --target nvptx64-nvidia-cuda +//@ [nvptx64_nvidia_cuda] needs-llvm-components: nvptx // Sanity-check that each target can produce assembly code. diff --git a/tests/assembly/targets/targets-pe.rs b/tests/assembly/targets/targets-pe.rs index 7398d7ef7900..63b07ee4d1a9 100644 --- a/tests/assembly/targets/targets-pe.rs +++ b/tests/assembly/targets/targets-pe.rs @@ -1,80 +1,80 @@ -// assembly-output: emit-asm +//@ assembly-output: emit-asm // ignore-tidy-linelength -// revisions: aarch64_pc_windows_msvc -// [aarch64_pc_windows_msvc] compile-flags: --target aarch64-pc-windows-msvc -// [aarch64_pc_windows_msvc] needs-llvm-components: aarch64 -// revisions: aarch64_pc_windows_gnullvm -// [aarch64_pc_windows_gnullvm] compile-flags: --target aarch64-pc-windows-gnullvm -// [aarch64_pc_windows_gnullvm] needs-llvm-components: aarch64 -// revisions: aarch64_unknown_uefi -// [aarch64_unknown_uefi] compile-flags: --target aarch64-unknown-uefi -// [aarch64_unknown_uefi] needs-llvm-components: aarch64 -// revisions: aarch64_uwp_windows_msvc -// [aarch64_uwp_windows_msvc] compile-flags: --target aarch64-uwp-windows-msvc -// [aarch64_uwp_windows_msvc] needs-llvm-components: aarch64 -// revisions: avr_unknown_gnu_atmega328 -// [avr_unknown_gnu_atmega328] compile-flags: --target avr-unknown-gnu-atmega328 -// [avr_unknown_gnu_atmega328] needs-llvm-components: avr -// revisions: bpfeb_unknown_none -// [bpfeb_unknown_none] compile-flags: --target bpfeb-unknown-none -// [bpfeb_unknown_none] needs-llvm-components: bpf -// revisions: bpfel_unknown_none -// [bpfel_unknown_none] compile-flags: --target bpfel-unknown-none -// [bpfel_unknown_none] needs-llvm-components: bpf -// revisions: i586_pc_windows_msvc -// [i586_pc_windows_msvc] compile-flags: --target i586-pc-windows-msvc -// [i586_pc_windows_msvc] needs-llvm-components: x86 -// revisions: i686_pc_windows_gnu -// [i686_pc_windows_gnu] compile-flags: --target i686-pc-windows-gnu -// [i686_pc_windows_gnu] needs-llvm-components: x86 -// revisions: i686_pc_windows_msvc -// [i686_pc_windows_msvc] compile-flags: --target i686-pc-windows-msvc -// [i686_pc_windows_msvc] needs-llvm-components: x86 -// revisions: i686_pc_windows_gnullvm -// [i686_pc_windows_gnullvm] compile-flags: --target i686-pc-windows-gnullvm -// [i686_pc_windows_gnullvm] needs-llvm-components: x86 -// revisions: i686_uwp_windows_gnu -// [i686_uwp_windows_gnu] compile-flags: --target i686-uwp-windows-gnu -// [i686_uwp_windows_gnu] needs-llvm-components: x86 -// revisions: i686_unknown_uefi -// [i686_unknown_uefi] compile-flags: --target i686-unknown-uefi -// [i686_unknown_uefi] needs-llvm-components: x86 -// revisions: i686_uwp_windows_msvc -// [i686_uwp_windows_msvc] compile-flags: --target i686-uwp-windows-msvc -// [i686_uwp_windows_msvc] needs-llvm-components: x86 -// revisions: i686_win7_windows_msvc -// [i686_win7_windows_msvc] compile-flags: --target i686-win7-windows-msvc -// [i686_win7_windows_msvc] needs-llvm-components: x86 -// revisions: powerpc64_ibm_aix -// [powerpc64_ibm_aix] compile-flags: --target powerpc64-ibm-aix -// [powerpc64_ibm_aix] needs-llvm-components: powerpc -// revisions: thumbv7a_uwp_windows_msvc -// [thumbv7a_uwp_windows_msvc] compile-flags: --target thumbv7a-uwp-windows-msvc -// [thumbv7a_uwp_windows_msvc] needs-llvm-components: arm -// revisions: thumbv7a_pc_windows_msvc -// [thumbv7a_pc_windows_msvc] compile-flags: --target thumbv7a-pc-windows-msvc -// [thumbv7a_pc_windows_msvc] needs-llvm-components: arm -// revisions: x86_64_pc_windows_gnu -// [x86_64_pc_windows_gnu] compile-flags: --target x86_64-pc-windows-gnu -// [x86_64_pc_windows_gnu] needs-llvm-components: x86 -// revisions: x86_64_pc_windows_gnullvm -// [x86_64_pc_windows_gnullvm] compile-flags: --target x86_64-pc-windows-gnullvm -// [x86_64_pc_windows_gnullvm] needs-llvm-components: x86 -// revisions: x86_64_pc_windows_msvc -// [x86_64_pc_windows_msvc] compile-flags: --target x86_64-pc-windows-msvc -// [x86_64_pc_windows_msvc] needs-llvm-components: x86 -// revisions: x86_64_unknown_uefi -// [x86_64_unknown_uefi] compile-flags: --target x86_64-unknown-uefi -// [x86_64_unknown_uefi] needs-llvm-components: x86 -// revisions: x86_64_uwp_windows_gnu -// [x86_64_uwp_windows_gnu] compile-flags: --target x86_64-uwp-windows-gnu -// [x86_64_uwp_windows_gnu] needs-llvm-components: x86 -// revisions: x86_64_uwp_windows_msvc -// [x86_64_uwp_windows_msvc] compile-flags: --target x86_64-uwp-windows-msvc -// [x86_64_uwp_windows_msvc] needs-llvm-components: x86 -// revisions: x86_64_win7_windows_msvc -// [x86_64_win7_windows_msvc] compile-flags: --target x86_64-win7-windows-msvc -// [x86_64_win7_windows_msvc] needs-llvm-components: x86 +//@ revisions: aarch64_pc_windows_msvc +//@ [aarch64_pc_windows_msvc] compile-flags: --target aarch64-pc-windows-msvc +//@ [aarch64_pc_windows_msvc] needs-llvm-components: aarch64 +//@ revisions: aarch64_pc_windows_gnullvm +//@ [aarch64_pc_windows_gnullvm] compile-flags: --target aarch64-pc-windows-gnullvm +//@ [aarch64_pc_windows_gnullvm] needs-llvm-components: aarch64 +//@ revisions: aarch64_unknown_uefi +//@ [aarch64_unknown_uefi] compile-flags: --target aarch64-unknown-uefi +//@ [aarch64_unknown_uefi] needs-llvm-components: aarch64 +//@ revisions: aarch64_uwp_windows_msvc +//@ [aarch64_uwp_windows_msvc] compile-flags: --target aarch64-uwp-windows-msvc +//@ [aarch64_uwp_windows_msvc] needs-llvm-components: aarch64 +//@ revisions: avr_unknown_gnu_atmega328 +//@ [avr_unknown_gnu_atmega328] compile-flags: --target avr-unknown-gnu-atmega328 +//@ [avr_unknown_gnu_atmega328] needs-llvm-components: avr +//@ revisions: bpfeb_unknown_none +//@ [bpfeb_unknown_none] compile-flags: --target bpfeb-unknown-none +//@ [bpfeb_unknown_none] needs-llvm-components: bpf +//@ revisions: bpfel_unknown_none +//@ [bpfel_unknown_none] compile-flags: --target bpfel-unknown-none +//@ [bpfel_unknown_none] needs-llvm-components: bpf +//@ revisions: i586_pc_windows_msvc +//@ [i586_pc_windows_msvc] compile-flags: --target i586-pc-windows-msvc +//@ [i586_pc_windows_msvc] needs-llvm-components: x86 +//@ revisions: i686_pc_windows_gnu +//@ [i686_pc_windows_gnu] compile-flags: --target i686-pc-windows-gnu +//@ [i686_pc_windows_gnu] needs-llvm-components: x86 +//@ revisions: i686_pc_windows_msvc +//@ [i686_pc_windows_msvc] compile-flags: --target i686-pc-windows-msvc +//@ [i686_pc_windows_msvc] needs-llvm-components: x86 +//@ revisions: i686_pc_windows_gnullvm +//@ [i686_pc_windows_gnullvm] compile-flags: --target i686-pc-windows-gnullvm +//@ [i686_pc_windows_gnullvm] needs-llvm-components: x86 +//@ revisions: i686_uwp_windows_gnu +//@ [i686_uwp_windows_gnu] compile-flags: --target i686-uwp-windows-gnu +//@ [i686_uwp_windows_gnu] needs-llvm-components: x86 +//@ revisions: i686_unknown_uefi +//@ [i686_unknown_uefi] compile-flags: --target i686-unknown-uefi +//@ [i686_unknown_uefi] needs-llvm-components: x86 +//@ revisions: i686_uwp_windows_msvc +//@ [i686_uwp_windows_msvc] compile-flags: --target i686-uwp-windows-msvc +//@ [i686_uwp_windows_msvc] needs-llvm-components: x86 +//@ revisions: i686_win7_windows_msvc +//@ [i686_win7_windows_msvc] compile-flags: --target i686-win7-windows-msvc +//@ [i686_win7_windows_msvc] needs-llvm-components: x86 +//@ revisions: powerpc64_ibm_aix +//@ [powerpc64_ibm_aix] compile-flags: --target powerpc64-ibm-aix +//@ [powerpc64_ibm_aix] needs-llvm-components: powerpc +//@ revisions: thumbv7a_uwp_windows_msvc +//@ [thumbv7a_uwp_windows_msvc] compile-flags: --target thumbv7a-uwp-windows-msvc +//@ [thumbv7a_uwp_windows_msvc] needs-llvm-components: arm +//@ revisions: thumbv7a_pc_windows_msvc +//@ [thumbv7a_pc_windows_msvc] compile-flags: --target thumbv7a-pc-windows-msvc +//@ [thumbv7a_pc_windows_msvc] needs-llvm-components: arm +//@ revisions: x86_64_pc_windows_gnu +//@ [x86_64_pc_windows_gnu] compile-flags: --target x86_64-pc-windows-gnu +//@ [x86_64_pc_windows_gnu] needs-llvm-components: x86 +//@ revisions: x86_64_pc_windows_gnullvm +//@ [x86_64_pc_windows_gnullvm] compile-flags: --target x86_64-pc-windows-gnullvm +//@ [x86_64_pc_windows_gnullvm] needs-llvm-components: x86 +//@ revisions: x86_64_pc_windows_msvc +//@ [x86_64_pc_windows_msvc] compile-flags: --target x86_64-pc-windows-msvc +//@ [x86_64_pc_windows_msvc] needs-llvm-components: x86 +//@ revisions: x86_64_unknown_uefi +//@ [x86_64_unknown_uefi] compile-flags: --target x86_64-unknown-uefi +//@ [x86_64_unknown_uefi] needs-llvm-components: x86 +//@ revisions: x86_64_uwp_windows_gnu +//@ [x86_64_uwp_windows_gnu] compile-flags: --target x86_64-uwp-windows-gnu +//@ [x86_64_uwp_windows_gnu] needs-llvm-components: x86 +//@ revisions: x86_64_uwp_windows_msvc +//@ [x86_64_uwp_windows_msvc] compile-flags: --target x86_64-uwp-windows-msvc +//@ [x86_64_uwp_windows_msvc] needs-llvm-components: x86 +//@ revisions: x86_64_win7_windows_msvc +//@ [x86_64_win7_windows_msvc] compile-flags: --target x86_64-win7-windows-msvc +//@ [x86_64_win7_windows_msvc] needs-llvm-components: x86 // Sanity-check that each target can produce assembly code. diff --git a/tests/assembly/thin-lto.rs b/tests/assembly/thin-lto.rs index deb8fd21d14f..182115662bfd 100644 --- a/tests/assembly/thin-lto.rs +++ b/tests/assembly/thin-lto.rs @@ -1,6 +1,6 @@ -// compile-flags: -O -C lto=thin -C prefer-dynamic=no -// only-x86_64-unknown-linux-gnu -// assembly-output: emit-asm +//@ compile-flags: -O -C lto=thin -C prefer-dynamic=no +//@ only-x86_64-unknown-linux-gnu +//@ assembly-output: emit-asm // CHECK: main diff --git a/tests/assembly/wasm_exceptions.rs b/tests/assembly/wasm_exceptions.rs index b7d20881b624..2ca62a786880 100644 --- a/tests/assembly/wasm_exceptions.rs +++ b/tests/assembly/wasm_exceptions.rs @@ -1,8 +1,8 @@ -// only-wasm32-bare -// assembly-output: emit-asm -// compile-flags: -C target-feature=+exception-handling -// compile-flags: -C panic=unwind -// compile-flags: -C llvm-args=-wasm-enable-eh +//@ only-wasm32-bare +//@ assembly-output: emit-asm +//@ compile-flags: -C target-feature=+exception-handling +//@ compile-flags: -C panic=unwind +//@ compile-flags: -C llvm-args=-wasm-enable-eh #![crate_type = "lib"] #![feature(core_intrinsics)] diff --git a/tests/assembly/x86_64-array-pair-load-store-merge.rs b/tests/assembly/x86_64-array-pair-load-store-merge.rs index 55e317e91bf0..9cf54ae14a16 100644 --- a/tests/assembly/x86_64-array-pair-load-store-merge.rs +++ b/tests/assembly/x86_64-array-pair-load-store-merge.rs @@ -1,8 +1,8 @@ -// assembly-output: emit-asm -// compile-flags: --crate-type=lib -O -C llvm-args=-x86-asm-syntax=intel -// only-x86_64 -// ignore-sgx -// ignore-macos (manipulates rsp too) +//@ assembly-output: emit-asm +//@ compile-flags: --crate-type=lib -O -C llvm-args=-x86-asm-syntax=intel +//@ only-x86_64 +//@ ignore-sgx +//@ ignore-macos (manipulates rsp too) // Depending on various codegen choices, this might end up copying // a `<2 x i8>`, an `i16`, or two `i8`s. diff --git a/tests/assembly/x86_64-floating-point-clamp.rs b/tests/assembly/x86_64-floating-point-clamp.rs index 0bc6baad4791..4a72a7f44fa0 100644 --- a/tests/assembly/x86_64-floating-point-clamp.rs +++ b/tests/assembly/x86_64-floating-point-clamp.rs @@ -1,10 +1,10 @@ // Floating-point clamp is designed to be implementable as max+min, // so check to make sure that's what it's actually emitting. -// assembly-output: emit-asm -// compile-flags: --crate-type=lib -O -C llvm-args=-x86-asm-syntax=intel -// only-x86_64 -// ignore-sgx +//@ assembly-output: emit-asm +//@ compile-flags: --crate-type=lib -O -C llvm-args=-x86-asm-syntax=intel +//@ only-x86_64 +//@ ignore-sgx // CHECK-LABEL: clamp_demo: #[no_mangle] diff --git a/tests/assembly/x86_64-fortanix-unknown-sgx-lvi-generic-load.rs b/tests/assembly/x86_64-fortanix-unknown-sgx-lvi-generic-load.rs index 7eb3c6948ac5..7215e354d0dc 100644 --- a/tests/assembly/x86_64-fortanix-unknown-sgx-lvi-generic-load.rs +++ b/tests/assembly/x86_64-fortanix-unknown-sgx-lvi-generic-load.rs @@ -1,8 +1,8 @@ // Test LVI load hardening on SGX enclave code -// assembly-output: emit-asm -// compile-flags: --crate-type staticlib -// only-x86_64-fortanix-unknown-sgx +//@ assembly-output: emit-asm +//@ compile-flags: --crate-type staticlib +//@ only-x86_64-fortanix-unknown-sgx #[no_mangle] pub extern fn plus_one(r: &mut u64) { diff --git a/tests/assembly/x86_64-fortanix-unknown-sgx-lvi-generic-ret.rs b/tests/assembly/x86_64-fortanix-unknown-sgx-lvi-generic-ret.rs index a21ef6b75894..5ae9dd11859e 100644 --- a/tests/assembly/x86_64-fortanix-unknown-sgx-lvi-generic-ret.rs +++ b/tests/assembly/x86_64-fortanix-unknown-sgx-lvi-generic-ret.rs @@ -1,8 +1,8 @@ // Test LVI ret hardening on generic rust code -// assembly-output: emit-asm -// compile-flags: --crate-type staticlib -// only-x86_64-fortanix-unknown-sgx +//@ assembly-output: emit-asm +//@ compile-flags: --crate-type staticlib +//@ only-x86_64-fortanix-unknown-sgx #[no_mangle] pub extern fn myret() {} diff --git a/tests/assembly/x86_64-fortanix-unknown-sgx-lvi-inline-assembly.rs b/tests/assembly/x86_64-fortanix-unknown-sgx-lvi-inline-assembly.rs index 4745ebc4fcd4..a729df8e1660 100644 --- a/tests/assembly/x86_64-fortanix-unknown-sgx-lvi-inline-assembly.rs +++ b/tests/assembly/x86_64-fortanix-unknown-sgx-lvi-inline-assembly.rs @@ -1,8 +1,8 @@ // Test LVI load hardening on SGX inline assembly code -// assembly-output: emit-asm -// compile-flags: --crate-type staticlib -// only-x86_64-fortanix-unknown-sgx +//@ assembly-output: emit-asm +//@ compile-flags: --crate-type staticlib +//@ only-x86_64-fortanix-unknown-sgx use std::arch::asm; diff --git a/tests/assembly/x86_64-function-return.rs b/tests/assembly/x86_64-function-return.rs index 0fcaca2d4910..64eb05062cbc 100644 --- a/tests/assembly/x86_64-function-return.rs +++ b/tests/assembly/x86_64-function-return.rs @@ -1,16 +1,16 @@ // Test that the function return is (not) converted into a jump to the thunk // when the `-Zfunction-return={keep,thunk-extern}` flag is (not) set. -// revisions: unset keep thunk-extern keep-thunk-extern thunk-extern-keep -// assembly-output: emit-asm -// compile-flags: -O -// [keep] compile-flags: -Zfunction-return=keep -// [thunk-extern] compile-flags: -Zfunction-return=thunk-extern -// [keep-thunk-extern] compile-flags: -Zfunction-return=keep -Zfunction-return=thunk-extern -// [thunk-extern-keep] compile-flags: -Zfunction-return=thunk-extern -Zfunction-return=keep -// only-x86_64 -// ignore-x86_64-apple-darwin Symbol is called `___x86_return_thunk` (Darwin's extra underscore) -// ignore-sgx Tests incompatible with LVI mitigations +//@ revisions: unset keep thunk-extern keep-thunk-extern thunk-extern-keep +//@ assembly-output: emit-asm +//@ compile-flags: -O +//@ [keep] compile-flags: -Zfunction-return=keep +//@ [thunk-extern] compile-flags: -Zfunction-return=thunk-extern +//@ [keep-thunk-extern] compile-flags: -Zfunction-return=keep -Zfunction-return=thunk-extern +//@ [thunk-extern-keep] compile-flags: -Zfunction-return=thunk-extern -Zfunction-return=keep +//@ only-x86_64 +//@ ignore-x86_64-apple-darwin Symbol is called `___x86_return_thunk` (Darwin's extra underscore) +//@ ignore-sgx Tests incompatible with LVI mitigations #![crate_type = "lib"] diff --git a/tests/assembly/x86_64-naked-fn-no-cet-prolog.rs b/tests/assembly/x86_64-naked-fn-no-cet-prolog.rs index bedcded731d9..a56838741821 100644 --- a/tests/assembly/x86_64-naked-fn-no-cet-prolog.rs +++ b/tests/assembly/x86_64-naked-fn-no-cet-prolog.rs @@ -1,7 +1,7 @@ -// compile-flags: -C no-prepopulate-passes -Zcf-protection=full -// assembly-output: emit-asm -// needs-asm-support -// only-x86_64 +//@ compile-flags: -C no-prepopulate-passes -Zcf-protection=full +//@ assembly-output: emit-asm +//@ needs-asm-support +//@ only-x86_64 #![crate_type = "lib"] #![feature(naked_functions)] diff --git a/tests/assembly/x86_64-no-jump-tables.rs b/tests/assembly/x86_64-no-jump-tables.rs index edf4adaad41a..9b7812262326 100644 --- a/tests/assembly/x86_64-no-jump-tables.rs +++ b/tests/assembly/x86_64-no-jump-tables.rs @@ -1,12 +1,12 @@ // Test that jump tables are (not) emitted when the `-Zno-jump-tables` // flag is (not) set. -// revisions: unset set -// assembly-output: emit-asm -// compile-flags: -O -// [set] compile-flags: -Zno-jump-tables -// only-x86_64 -// ignore-sgx +//@ revisions: unset set +//@ assembly-output: emit-asm +//@ compile-flags: -O +//@ [set] compile-flags: -Zno-jump-tables +//@ only-x86_64 +//@ ignore-sgx #![crate_type = "lib"] diff --git a/tests/assembly/x86_64-sse_crc.rs b/tests/assembly/x86_64-sse_crc.rs index cdbf057b80bd..bde58955a214 100644 --- a/tests/assembly/x86_64-sse_crc.rs +++ b/tests/assembly/x86_64-sse_crc.rs @@ -1,6 +1,6 @@ -// only-x86_64 -// assembly-output: emit-asm -// compile-flags: --crate-type staticlib -Ctarget-feature=+sse4.2 +//@ only-x86_64 +//@ assembly-output: emit-asm +//@ compile-flags: --crate-type staticlib -Ctarget-feature=+sse4.2 // CHECK-LABEL: banana // CHECK: crc32 diff --git a/tests/codegen-units/item-collection/asm-sym.rs b/tests/codegen-units/item-collection/asm-sym.rs index 4b05b771a9b2..948c98d5a3c8 100644 --- a/tests/codegen-units/item-collection/asm-sym.rs +++ b/tests/codegen-units/item-collection/asm-sym.rs @@ -1,5 +1,5 @@ -// needs-asm-support -// compile-flags: -Ccodegen-units=1 -Zprint-mono-items=lazy --crate-type=lib +//@ needs-asm-support +//@ compile-flags: -Ccodegen-units=1 -Zprint-mono-items=lazy --crate-type=lib #[inline(always)] pub unsafe fn f() { diff --git a/tests/codegen-units/item-collection/auxiliary/cgu_export_trait_method.rs b/tests/codegen-units/item-collection/auxiliary/cgu_export_trait_method.rs index e94dded55cff..5566bb4e4b28 100644 --- a/tests/codegen-units/item-collection/auxiliary/cgu_export_trait_method.rs +++ b/tests/codegen-units/item-collection/auxiliary/cgu_export_trait_method.rs @@ -1,4 +1,4 @@ -// compile-flags: -Copt-level=0 +//@ compile-flags: -Copt-level=0 #![crate_type = "lib"] diff --git a/tests/codegen-units/item-collection/cross-crate-closures.rs b/tests/codegen-units/item-collection/cross-crate-closures.rs index 6af344fab151..4ec7f17d5847 100644 --- a/tests/codegen-units/item-collection/cross-crate-closures.rs +++ b/tests/codegen-units/item-collection/cross-crate-closures.rs @@ -1,14 +1,14 @@ // In the current version of the collector that still has to support // legacy-codegen, closures do not generate their own MonoItems, so we are // ignoring this test until MIR codegen has taken over completely -// ignore-test +//@ ignore-test -// compile-flags:-Zprint-mono-items=eager +//@ compile-flags:-Zprint-mono-items=eager #![deny(dead_code)] #![feature(start)] -// aux-build:cgu_extern_closures.rs +//@ aux-build:cgu_extern_closures.rs extern crate cgu_extern_closures; //~ MONO_ITEM fn cross_crate_closures::start[0] diff --git a/tests/codegen-units/item-collection/cross-crate-generic-functions.rs b/tests/codegen-units/item-collection/cross-crate-generic-functions.rs index 7289ceee95b1..d36f7067b327 100644 --- a/tests/codegen-units/item-collection/cross-crate-generic-functions.rs +++ b/tests/codegen-units/item-collection/cross-crate-generic-functions.rs @@ -1,9 +1,9 @@ -// compile-flags:-Zprint-mono-items=eager +//@ compile-flags:-Zprint-mono-items=eager #![deny(dead_code)] #![feature(start)] -// aux-build:cgu_generic_function.rs +//@ aux-build:cgu_generic_function.rs extern crate cgu_generic_function; //~ MONO_ITEM fn start diff --git a/tests/codegen-units/item-collection/cross-crate-trait-method.rs b/tests/codegen-units/item-collection/cross-crate-trait-method.rs index 778b3820f18e..84977328e490 100644 --- a/tests/codegen-units/item-collection/cross-crate-trait-method.rs +++ b/tests/codegen-units/item-collection/cross-crate-trait-method.rs @@ -1,9 +1,9 @@ -// compile-flags:-Zprint-mono-items=eager -Zinline-mir=no -Copt-level=0 +//@ compile-flags:-Zprint-mono-items=eager -Zinline-mir=no -Copt-level=0 #![deny(dead_code)] #![feature(start)] -// aux-build:cgu_export_trait_method.rs +//@ aux-build:cgu_export_trait_method.rs extern crate cgu_export_trait_method; use cgu_export_trait_method::Trait; diff --git a/tests/codegen-units/item-collection/drop_in_place_intrinsic.rs b/tests/codegen-units/item-collection/drop_in_place_intrinsic.rs index a3f1fb5e7a25..66dcda260660 100644 --- a/tests/codegen-units/item-collection/drop_in_place_intrinsic.rs +++ b/tests/codegen-units/item-collection/drop_in_place_intrinsic.rs @@ -1,6 +1,6 @@ // -// compile-flags:-Zprint-mono-items=eager -// compile-flags:-Zinline-in-all-cgus +//@ compile-flags:-Zprint-mono-items=eager +//@ compile-flags:-Zinline-in-all-cgus #![feature(start)] diff --git a/tests/codegen-units/item-collection/function-as-argument.rs b/tests/codegen-units/item-collection/function-as-argument.rs index d951cbfacec6..4e6fd99d29ed 100644 --- a/tests/codegen-units/item-collection/function-as-argument.rs +++ b/tests/codegen-units/item-collection/function-as-argument.rs @@ -1,4 +1,4 @@ -// compile-flags:-Zprint-mono-items=eager -Zinline-mir=no +//@ compile-flags:-Zprint-mono-items=eager -Zinline-mir=no #![deny(dead_code)] #![feature(start)] diff --git a/tests/codegen-units/item-collection/generic-drop-glue.rs b/tests/codegen-units/item-collection/generic-drop-glue.rs index ca477d066109..99250dc7dc67 100644 --- a/tests/codegen-units/item-collection/generic-drop-glue.rs +++ b/tests/codegen-units/item-collection/generic-drop-glue.rs @@ -1,6 +1,6 @@ // -// compile-flags:-Zprint-mono-items=eager -// compile-flags:-Zinline-in-all-cgus +//@ compile-flags:-Zprint-mono-items=eager +//@ compile-flags:-Zinline-in-all-cgus #![deny(dead_code)] #![feature(start)] diff --git a/tests/codegen-units/item-collection/generic-functions.rs b/tests/codegen-units/item-collection/generic-functions.rs index f790cd0dadd7..2d7c70c9c4c7 100644 --- a/tests/codegen-units/item-collection/generic-functions.rs +++ b/tests/codegen-units/item-collection/generic-functions.rs @@ -1,4 +1,4 @@ -// compile-flags:-Zprint-mono-items=eager -Zinline-mir=no +//@ compile-flags:-Zprint-mono-items=eager -Zinline-mir=no #![deny(dead_code)] #![feature(start)] diff --git a/tests/codegen-units/item-collection/generic-impl.rs b/tests/codegen-units/item-collection/generic-impl.rs index e19eec36b31e..6e60907c1857 100644 --- a/tests/codegen-units/item-collection/generic-impl.rs +++ b/tests/codegen-units/item-collection/generic-impl.rs @@ -1,4 +1,4 @@ -// compile-flags:-Zprint-mono-items=eager -Zinline-mir=no +//@ compile-flags:-Zprint-mono-items=eager -Zinline-mir=no #![deny(dead_code)] #![feature(start)] diff --git a/tests/codegen-units/item-collection/impl-in-non-instantiated-generic.rs b/tests/codegen-units/item-collection/impl-in-non-instantiated-generic.rs index c01398eb2341..0b7f30187b58 100644 --- a/tests/codegen-units/item-collection/impl-in-non-instantiated-generic.rs +++ b/tests/codegen-units/item-collection/impl-in-non-instantiated-generic.rs @@ -1,4 +1,4 @@ -// compile-flags:-Zprint-mono-items=eager +//@ compile-flags:-Zprint-mono-items=eager #![deny(dead_code)] #![feature(start)] diff --git a/tests/codegen-units/item-collection/implicit-panic-call.rs b/tests/codegen-units/item-collection/implicit-panic-call.rs index abec7ad50aed..2e0d742307a8 100644 --- a/tests/codegen-units/item-collection/implicit-panic-call.rs +++ b/tests/codegen-units/item-collection/implicit-panic-call.rs @@ -1,4 +1,4 @@ -// compile-flags:-Zprint-mono-items=lazy +//@ compile-flags:-Zprint-mono-items=lazy // rust-lang/rust#90405 // Ensure implicit panic calls are collected diff --git a/tests/codegen-units/item-collection/instantiation-through-vtable.rs b/tests/codegen-units/item-collection/instantiation-through-vtable.rs index 41edab7f8793..08e8c03a7328 100644 --- a/tests/codegen-units/item-collection/instantiation-through-vtable.rs +++ b/tests/codegen-units/item-collection/instantiation-through-vtable.rs @@ -1,5 +1,5 @@ // -// compile-flags:-Zprint-mono-items=eager -Zinline-in-all-cgus -Zmir-opt-level=0 +//@ compile-flags:-Zprint-mono-items=eager -Zinline-in-all-cgus -Zmir-opt-level=0 #![deny(dead_code)] #![feature(start)] diff --git a/tests/codegen-units/item-collection/items-within-generic-items.rs b/tests/codegen-units/item-collection/items-within-generic-items.rs index bb1a3be36c5c..7798d2b46d22 100644 --- a/tests/codegen-units/item-collection/items-within-generic-items.rs +++ b/tests/codegen-units/item-collection/items-within-generic-items.rs @@ -1,4 +1,4 @@ -// compile-flags:-Zprint-mono-items=eager -Copt-level=0 +//@ compile-flags:-Zprint-mono-items=eager -Copt-level=0 #![deny(dead_code)] #![feature(start)] diff --git a/tests/codegen-units/item-collection/non-generic-closures.rs b/tests/codegen-units/item-collection/non-generic-closures.rs index 379fbcf2613e..105348e9d09e 100644 --- a/tests/codegen-units/item-collection/non-generic-closures.rs +++ b/tests/codegen-units/item-collection/non-generic-closures.rs @@ -1,10 +1,10 @@ // In the current version of the collector that still has to support // legacy-codegen, closures do not generate their own MonoItems, so we are // ignoring this test until MIR codegen has taken over completely -// ignore-test +//@ ignore-test // -// compile-flags:-Zprint-mono-items=eager +//@ compile-flags:-Zprint-mono-items=eager #![deny(dead_code)] #![feature(start)] diff --git a/tests/codegen-units/item-collection/non-generic-drop-glue.rs b/tests/codegen-units/item-collection/non-generic-drop-glue.rs index 06f76f7db366..d74b17463bf1 100644 --- a/tests/codegen-units/item-collection/non-generic-drop-glue.rs +++ b/tests/codegen-units/item-collection/non-generic-drop-glue.rs @@ -1,6 +1,6 @@ // -// compile-flags:-Zprint-mono-items=eager -// compile-flags:-Zinline-in-all-cgus +//@ compile-flags:-Zprint-mono-items=eager +//@ compile-flags:-Zinline-in-all-cgus #![deny(dead_code)] #![feature(start)] diff --git a/tests/codegen-units/item-collection/non-generic-functions.rs b/tests/codegen-units/item-collection/non-generic-functions.rs index 092e64562c52..49a999a0d7c8 100644 --- a/tests/codegen-units/item-collection/non-generic-functions.rs +++ b/tests/codegen-units/item-collection/non-generic-functions.rs @@ -1,4 +1,4 @@ -// compile-flags:-Zprint-mono-items=eager +//@ compile-flags:-Zprint-mono-items=eager #![deny(dead_code)] #![feature(start)] diff --git a/tests/codegen-units/item-collection/overloaded-operators.rs b/tests/codegen-units/item-collection/overloaded-operators.rs index 2be7eba1d84a..23141c27de6e 100644 --- a/tests/codegen-units/item-collection/overloaded-operators.rs +++ b/tests/codegen-units/item-collection/overloaded-operators.rs @@ -1,4 +1,4 @@ -// compile-flags:-Zprint-mono-items=eager +//@ compile-flags:-Zprint-mono-items=eager #![deny(dead_code)] #![crate_type="lib"] diff --git a/tests/codegen-units/item-collection/static-init.rs b/tests/codegen-units/item-collection/static-init.rs index 287ec8f24ebc..b357f5cd66b2 100644 --- a/tests/codegen-units/item-collection/static-init.rs +++ b/tests/codegen-units/item-collection/static-init.rs @@ -1,4 +1,4 @@ -// compile-flags:-Zprint-mono-items=eager -Zpolymorphize=on +//@ compile-flags:-Zprint-mono-items=eager -Zpolymorphize=on #![feature(start)] diff --git a/tests/codegen-units/item-collection/statics-and-consts.rs b/tests/codegen-units/item-collection/statics-and-consts.rs index 49a8d3dff639..1e3782f0c6e6 100644 --- a/tests/codegen-units/item-collection/statics-and-consts.rs +++ b/tests/codegen-units/item-collection/statics-and-consts.rs @@ -1,4 +1,4 @@ -// compile-flags:-Zprint-mono-items=eager +//@ compile-flags:-Zprint-mono-items=eager #![deny(dead_code)] #![feature(start)] diff --git a/tests/codegen-units/item-collection/trait-implementations.rs b/tests/codegen-units/item-collection/trait-implementations.rs index ad0ed7da28e6..b364cc5b3336 100644 --- a/tests/codegen-units/item-collection/trait-implementations.rs +++ b/tests/codegen-units/item-collection/trait-implementations.rs @@ -1,4 +1,4 @@ -// compile-flags:-Zprint-mono-items=eager -Zinline-mir=no +//@ compile-flags:-Zprint-mono-items=eager -Zinline-mir=no #![deny(dead_code)] #![feature(start)] diff --git a/tests/codegen-units/item-collection/trait-method-as-argument.rs b/tests/codegen-units/item-collection/trait-method-as-argument.rs index 164ef794ca7e..c25e3ea45ecc 100644 --- a/tests/codegen-units/item-collection/trait-method-as-argument.rs +++ b/tests/codegen-units/item-collection/trait-method-as-argument.rs @@ -1,4 +1,4 @@ -// compile-flags:-Zprint-mono-items=eager -Zinline-mir=no +//@ compile-flags:-Zprint-mono-items=eager -Zinline-mir=no #![deny(dead_code)] #![feature(start)] diff --git a/tests/codegen-units/item-collection/trait-method-default-impl.rs b/tests/codegen-units/item-collection/trait-method-default-impl.rs index c8a4552b11ac..89fec350f09c 100644 --- a/tests/codegen-units/item-collection/trait-method-default-impl.rs +++ b/tests/codegen-units/item-collection/trait-method-default-impl.rs @@ -1,4 +1,4 @@ -// compile-flags:-Zprint-mono-items=eager -Zpolymorphize=on -Zinline-mir=no +//@ compile-flags:-Zprint-mono-items=eager -Zpolymorphize=on -Zinline-mir=no #![deny(dead_code)] #![feature(start)] diff --git a/tests/codegen-units/item-collection/transitive-drop-glue.rs b/tests/codegen-units/item-collection/transitive-drop-glue.rs index 5f20637b40fa..7c879dee1a19 100644 --- a/tests/codegen-units/item-collection/transitive-drop-glue.rs +++ b/tests/codegen-units/item-collection/transitive-drop-glue.rs @@ -1,6 +1,6 @@ // -// compile-flags:-Zprint-mono-items=eager -// compile-flags:-Zinline-in-all-cgus +//@ compile-flags:-Zprint-mono-items=eager +//@ compile-flags:-Zinline-in-all-cgus #![deny(dead_code)] #![feature(start)] diff --git a/tests/codegen-units/item-collection/tuple-drop-glue.rs b/tests/codegen-units/item-collection/tuple-drop-glue.rs index ae3b2e081ffa..9d8b0cdd3844 100644 --- a/tests/codegen-units/item-collection/tuple-drop-glue.rs +++ b/tests/codegen-units/item-collection/tuple-drop-glue.rs @@ -1,6 +1,6 @@ // -// compile-flags:-Zprint-mono-items=eager -// compile-flags:-Zinline-in-all-cgus +//@ compile-flags:-Zprint-mono-items=eager +//@ compile-flags:-Zinline-in-all-cgus #![deny(dead_code)] #![feature(start)] diff --git a/tests/codegen-units/item-collection/unreferenced-const-fn.rs b/tests/codegen-units/item-collection/unreferenced-const-fn.rs index 5f59d801504e..8b37570a1be5 100644 --- a/tests/codegen-units/item-collection/unreferenced-const-fn.rs +++ b/tests/codegen-units/item-collection/unreferenced-const-fn.rs @@ -1,4 +1,4 @@ -// compile-flags:-Zprint-mono-items=lazy +//@ compile-flags:-Zprint-mono-items=lazy #![deny(dead_code)] #![crate_type = "rlib"] diff --git a/tests/codegen-units/item-collection/unreferenced-inline-function.rs b/tests/codegen-units/item-collection/unreferenced-inline-function.rs index 4d095e4d6c7e..f725cce90d61 100644 --- a/tests/codegen-units/item-collection/unreferenced-inline-function.rs +++ b/tests/codegen-units/item-collection/unreferenced-inline-function.rs @@ -1,4 +1,4 @@ -// compile-flags:-Zprint-mono-items=lazy +//@ compile-flags:-Zprint-mono-items=lazy // N.B., we do not expect *any* monomorphization to be generated here. diff --git a/tests/codegen-units/item-collection/unsizing.rs b/tests/codegen-units/item-collection/unsizing.rs index f578b00f2766..1e2d7f174845 100644 --- a/tests/codegen-units/item-collection/unsizing.rs +++ b/tests/codegen-units/item-collection/unsizing.rs @@ -1,6 +1,6 @@ -// compile-flags:-Zprint-mono-items=eager -// compile-flags:-Zinline-in-all-cgus -// compile-flags:-Zmir-opt-level=0 +//@ compile-flags:-Zprint-mono-items=eager +//@ compile-flags:-Zinline-in-all-cgus +//@ compile-flags:-Zmir-opt-level=0 #![deny(dead_code)] #![feature(coerce_unsized)] diff --git a/tests/codegen-units/item-collection/unused-traits-and-generics.rs b/tests/codegen-units/item-collection/unused-traits-and-generics.rs index 561dc1a5c076..27cdae2c0962 100644 --- a/tests/codegen-units/item-collection/unused-traits-and-generics.rs +++ b/tests/codegen-units/item-collection/unused-traits-and-generics.rs @@ -1,4 +1,4 @@ -// compile-flags:-Zprint-mono-items=eager +//@ compile-flags:-Zprint-mono-items=eager #![crate_type="lib"] #![deny(dead_code)] diff --git a/tests/codegen-units/partitioning/auxiliary/shared_generics_aux.rs b/tests/codegen-units/partitioning/auxiliary/shared_generics_aux.rs index ffbd0dc54844..158932d165df 100644 --- a/tests/codegen-units/partitioning/auxiliary/shared_generics_aux.rs +++ b/tests/codegen-units/partitioning/auxiliary/shared_generics_aux.rs @@ -1,7 +1,7 @@ // NOTE: We always compile this test with -Copt-level=0 because higher opt-levels // prevent drop-glue from participating in share-generics. -// compile-flags:-Zshare-generics=yes -Copt-level=0 -// no-prefer-dynamic +//@ compile-flags:-Zshare-generics=yes -Copt-level=0 +//@ no-prefer-dynamic #![crate_type="rlib"] diff --git a/tests/codegen-units/partitioning/extern-drop-glue.rs b/tests/codegen-units/partitioning/extern-drop-glue.rs index c73d2a10a967..84eb802f264b 100644 --- a/tests/codegen-units/partitioning/extern-drop-glue.rs +++ b/tests/codegen-units/partitioning/extern-drop-glue.rs @@ -1,16 +1,16 @@ // // We specify incremental here because we want to test the partitioning for -// incremental compilation +//@ incremental compilation // We specify opt-level=0 because `drop_in_place` is `Internal` when optimizing -// incremental -// compile-flags:-Zprint-mono-items=lazy -// compile-flags:-Zinline-in-all-cgus -Copt-level=0 +//@ incremental +//@ compile-flags:-Zprint-mono-items=lazy +//@ compile-flags:-Zinline-in-all-cgus -Copt-level=0 #![allow(dead_code)] #![crate_type = "rlib"] -// aux-build:cgu_extern_drop_glue.rs +//@ aux-build:cgu_extern_drop_glue.rs extern crate cgu_extern_drop_glue; //~ MONO_ITEM fn std::ptr::drop_in_place:: - shim(Some(cgu_extern_drop_glue::Struct)) @@ extern_drop_glue-fallback.cgu[External] diff --git a/tests/codegen-units/partitioning/extern-generic.rs b/tests/codegen-units/partitioning/extern-generic.rs index 638ec079a0bc..abd3918094d7 100644 --- a/tests/codegen-units/partitioning/extern-generic.rs +++ b/tests/codegen-units/partitioning/extern-generic.rs @@ -1,13 +1,13 @@ // // We specify incremental here because we want to test the partitioning for -// incremental compilation -// incremental -// compile-flags:-Zprint-mono-items=eager -Zshare-generics=y +//@ incremental compilation +//@ incremental +//@ compile-flags:-Zprint-mono-items=eager -Zshare-generics=y #![allow(dead_code)] #![crate_type="lib"] -// aux-build:cgu_generic_function.rs +//@ aux-build:cgu_generic_function.rs extern crate cgu_generic_function; //~ MONO_ITEM fn user @@ extern_generic[Internal] diff --git a/tests/codegen-units/partitioning/incremental-merging.rs b/tests/codegen-units/partitioning/incremental-merging.rs index 118b7bdf4da8..b44090c866a0 100644 --- a/tests/codegen-units/partitioning/incremental-merging.rs +++ b/tests/codegen-units/partitioning/incremental-merging.rs @@ -1,8 +1,8 @@ // We specify incremental here because we want to test the partitioning for -// incremental compilation -// incremental -// compile-flags:-Zprint-mono-items=lazy -// compile-flags:-Ccodegen-units=3 +//@ incremental compilation +//@ incremental +//@ compile-flags:-Zprint-mono-items=lazy +//@ compile-flags:-Ccodegen-units=3 #![crate_type = "rlib"] diff --git a/tests/codegen-units/partitioning/inlining-from-extern-crate.rs b/tests/codegen-units/partitioning/inlining-from-extern-crate.rs index 1cc21632e481..74734d3cf38a 100644 --- a/tests/codegen-units/partitioning/inlining-from-extern-crate.rs +++ b/tests/codegen-units/partitioning/inlining-from-extern-crate.rs @@ -1,13 +1,13 @@ // // We specify incremental here because we want to test the partitioning for -// incremental compilation -// incremental -// compile-flags:-Zprint-mono-items=lazy -// compile-flags:-Zinline-in-all-cgus +//@ incremental compilation +//@ incremental +//@ compile-flags:-Zprint-mono-items=lazy +//@ compile-flags:-Zinline-in-all-cgus #![crate_type="lib"] -// aux-build:cgu_explicit_inlining.rs +//@ aux-build:cgu_explicit_inlining.rs extern crate cgu_explicit_inlining; // This test makes sure that items inlined from external crates are privately diff --git a/tests/codegen-units/partitioning/local-drop-glue.rs b/tests/codegen-units/partitioning/local-drop-glue.rs index 2fd853a44b8f..0974187ade0d 100644 --- a/tests/codegen-units/partitioning/local-drop-glue.rs +++ b/tests/codegen-units/partitioning/local-drop-glue.rs @@ -1,10 +1,10 @@ // // We specify incremental here because we want to test the partitioning for -// incremental compilation +//@ incremental compilation // We specify opt-level=0 because `drop_in_place` is `Internal` when optimizing -// incremental -// compile-flags:-Zprint-mono-items=lazy -// compile-flags:-Zinline-in-all-cgus -Copt-level=0 +//@ incremental +//@ compile-flags:-Zprint-mono-items=lazy +//@ compile-flags:-Zinline-in-all-cgus -Copt-level=0 #![allow(dead_code)] #![crate_type = "rlib"] diff --git a/tests/codegen-units/partitioning/local-generic.rs b/tests/codegen-units/partitioning/local-generic.rs index 38aec7291df3..2cfdc27ccb14 100644 --- a/tests/codegen-units/partitioning/local-generic.rs +++ b/tests/codegen-units/partitioning/local-generic.rs @@ -1,7 +1,7 @@ // We specify incremental here because we want to test the partitioning for -// incremental compilation -// incremental -// compile-flags:-Zprint-mono-items=eager +//@ incremental compilation +//@ incremental +//@ compile-flags:-Zprint-mono-items=eager #![allow(dead_code)] #![crate_type="lib"] diff --git a/tests/codegen-units/partitioning/local-inlining-but-not-all.rs b/tests/codegen-units/partitioning/local-inlining-but-not-all.rs index 318f0c28a598..49a2ce7c5d9d 100644 --- a/tests/codegen-units/partitioning/local-inlining-but-not-all.rs +++ b/tests/codegen-units/partitioning/local-inlining-but-not-all.rs @@ -1,9 +1,9 @@ // // We specify incremental here because we want to test the partitioning for -// incremental compilation -// incremental -// compile-flags:-Zprint-mono-items=lazy -// compile-flags:-Zinline-in-all-cgus=no +//@ incremental compilation +//@ incremental +//@ compile-flags:-Zprint-mono-items=lazy +//@ compile-flags:-Zinline-in-all-cgus=no #![allow(dead_code)] #![crate_type="lib"] diff --git a/tests/codegen-units/partitioning/local-inlining.rs b/tests/codegen-units/partitioning/local-inlining.rs index 841a428e9dd2..726cf2b87d26 100644 --- a/tests/codegen-units/partitioning/local-inlining.rs +++ b/tests/codegen-units/partitioning/local-inlining.rs @@ -1,9 +1,9 @@ // // We specify incremental here because we want to test the partitioning for -// incremental compilation -// incremental -// compile-flags:-Zprint-mono-items=lazy -// compile-flags:-Zinline-in-all-cgus +//@ incremental compilation +//@ incremental +//@ compile-flags:-Zprint-mono-items=lazy +//@ compile-flags:-Zinline-in-all-cgus #![allow(dead_code)] #![crate_type="lib"] diff --git a/tests/codegen-units/partitioning/local-transitive-inlining.rs b/tests/codegen-units/partitioning/local-transitive-inlining.rs index 03c37954d151..355eb6cf3954 100644 --- a/tests/codegen-units/partitioning/local-transitive-inlining.rs +++ b/tests/codegen-units/partitioning/local-transitive-inlining.rs @@ -1,9 +1,9 @@ // // We specify incremental here because we want to test the partitioning for -// incremental compilation -// incremental -// compile-flags:-Zprint-mono-items=lazy -// compile-flags:-Zinline-in-all-cgus +//@ incremental compilation +//@ incremental +//@ compile-flags:-Zprint-mono-items=lazy +//@ compile-flags:-Zinline-in-all-cgus #![allow(dead_code)] #![crate_type="rlib"] diff --git a/tests/codegen-units/partitioning/methods-are-with-self-type.rs b/tests/codegen-units/partitioning/methods-are-with-self-type.rs index 8220dc12ee0c..2e54725ff285 100644 --- a/tests/codegen-units/partitioning/methods-are-with-self-type.rs +++ b/tests/codegen-units/partitioning/methods-are-with-self-type.rs @@ -1,13 +1,13 @@ // Currently, all generic functions are instantiated in each codegen unit that // uses them, even those not marked with #[inline], so this test does not make // much sense at the moment. -// ignore-test +//@ ignore-test // // We specify incremental here because we want to test the partitioning for -// incremental compilation -// incremental -// compile-flags:-Zprint-mono-items=lazy +//@ incremental compilation +//@ incremental +//@ compile-flags:-Zprint-mono-items=lazy #![allow(dead_code)] #![feature(start)] diff --git a/tests/codegen-units/partitioning/regular-modules.rs b/tests/codegen-units/partitioning/regular-modules.rs index ce7fe9c3a4ff..0eb0848e4544 100644 --- a/tests/codegen-units/partitioning/regular-modules.rs +++ b/tests/codegen-units/partitioning/regular-modules.rs @@ -1,7 +1,7 @@ // We specify incremental here because we want to test the partitioning for -// incremental compilation -// incremental -// compile-flags:-Zprint-mono-items=eager +//@ incremental compilation +//@ incremental +//@ compile-flags:-Zprint-mono-items=eager #![allow(dead_code)] #![crate_type="lib"] diff --git a/tests/codegen-units/partitioning/shared-generics.rs b/tests/codegen-units/partitioning/shared-generics.rs index ebe96bfb746a..25ea7fab7355 100644 --- a/tests/codegen-units/partitioning/shared-generics.rs +++ b/tests/codegen-units/partitioning/shared-generics.rs @@ -1,13 +1,13 @@ // -// no-prefer-dynamic +//@ no-prefer-dynamic // NOTE: We always compile this test with -Copt-level=0 because higher opt-levels // prevent drop-glue from participating in share-generics. -// incremental -// compile-flags:-Zprint-mono-items=eager -Zshare-generics=yes -Copt-level=0 +//@ incremental +//@ compile-flags:-Zprint-mono-items=eager -Zshare-generics=yes -Copt-level=0 #![crate_type="rlib"] -// aux-build:shared_generics_aux.rs +//@ aux-build:shared_generics_aux.rs extern crate shared_generics_aux; //~ MONO_ITEM fn foo diff --git a/tests/codegen-units/partitioning/statics.rs b/tests/codegen-units/partitioning/statics.rs index b11d6696dc00..9503a91b0ab4 100644 --- a/tests/codegen-units/partitioning/statics.rs +++ b/tests/codegen-units/partitioning/statics.rs @@ -1,7 +1,7 @@ // We specify incremental here because we want to test the partitioning for -// incremental compilation -// incremental -// compile-flags:-Zprint-mono-items=lazy +//@ incremental compilation +//@ incremental +//@ compile-flags:-Zprint-mono-items=lazy #![crate_type="rlib"] diff --git a/tests/codegen-units/partitioning/vtable-through-const.rs b/tests/codegen-units/partitioning/vtable-through-const.rs index cedcca804b36..111b4fa1b9ac 100644 --- a/tests/codegen-units/partitioning/vtable-through-const.rs +++ b/tests/codegen-units/partitioning/vtable-through-const.rs @@ -1,10 +1,10 @@ // // We specify incremental here because we want to test the partitioning for -// incremental compilation -// incremental -// compile-flags:-Zprint-mono-items=lazy -// compile-flags:-Zinline-in-all-cgus +//@ incremental compilation +//@ incremental +//@ compile-flags:-Zprint-mono-items=lazy +//@ compile-flags:-Zinline-in-all-cgus // This test case makes sure, that references made through constants are // recorded properly in the InliningMap. diff --git a/tests/codegen-units/polymorphization/auxiliary/poly-dep.rs b/tests/codegen-units/polymorphization/auxiliary/poly-dep.rs index fdbfa1b096d4..d6cbd282ec1d 100644 --- a/tests/codegen-units/polymorphization/auxiliary/poly-dep.rs +++ b/tests/codegen-units/polymorphization/auxiliary/poly-dep.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zpolymorphize=on +//@ compile-flags: -Zpolymorphize=on #[inline(never)] pub fn foo() {} diff --git a/tests/codegen-units/polymorphization/poly-foreign.rs b/tests/codegen-units/polymorphization/poly-foreign.rs index 9da082daf114..05dbac46d368 100644 --- a/tests/codegen-units/polymorphization/poly-foreign.rs +++ b/tests/codegen-units/polymorphization/poly-foreign.rs @@ -1,5 +1,5 @@ -// aux-build:poly-dep.rs -// compile-flags: --crate-type=lib -Zprint-mono-items=eager -Zpolymorphize=on +//@ aux-build:poly-dep.rs +//@ compile-flags: --crate-type=lib -Zprint-mono-items=eager -Zpolymorphize=on extern crate poly_dep; diff --git a/tests/codegen-units/polymorphization/unused_type_parameters.rs b/tests/codegen-units/polymorphization/unused_type_parameters.rs index c2e06d067dc6..cf5f7c320985 100644 --- a/tests/codegen-units/polymorphization/unused_type_parameters.rs +++ b/tests/codegen-units/polymorphization/unused_type_parameters.rs @@ -1,4 +1,4 @@ -// compile-flags:-Zpolymorphize=on -Zprint-mono-items=lazy -Copt-level=1 +//@ compile-flags:-Zpolymorphize=on -Zprint-mono-items=lazy -Copt-level=1 #![crate_type = "rlib"] diff --git a/tests/codegen/aarch64-struct-align-128.rs b/tests/codegen/aarch64-struct-align-128.rs index bf34717786d4..0a30a2527da6 100644 --- a/tests/codegen/aarch64-struct-align-128.rs +++ b/tests/codegen/aarch64-struct-align-128.rs @@ -1,12 +1,12 @@ // Test that structs aligned to 128 bits are passed with the correct ABI on aarch64. -// revisions:linux darwin windows -//[linux] compile-flags: --target aarch64-unknown-linux-gnu -//[darwin] compile-flags: --target aarch64-apple-darwin -//[windows] compile-flags: --target aarch64-pc-windows-msvc -//[linux] needs-llvm-components: aarch64 -//[darwin] needs-llvm-components: aarch64 -//[windows] needs-llvm-components: aarch64 +//@ revisions:linux darwin windows +//@[linux] compile-flags: --target aarch64-unknown-linux-gnu +//@[darwin] compile-flags: --target aarch64-apple-darwin +//@[windows] compile-flags: --target aarch64-pc-windows-msvc +//@[linux] needs-llvm-components: aarch64 +//@[darwin] needs-llvm-components: aarch64 +//@[windows] needs-llvm-components: aarch64 #![feature(no_core, lang_items)] #![crate_type = "lib"] diff --git a/tests/codegen/abi-efiapi.rs b/tests/codegen/abi-efiapi.rs index 9502ebf59af7..fa73f649ed87 100644 --- a/tests/codegen/abi-efiapi.rs +++ b/tests/codegen/abi-efiapi.rs @@ -1,17 +1,17 @@ // Checks if the correct annotation for the efiapi ABI is passed to llvm. -// revisions:x86_64 i686 aarch64 arm riscv -//[x86_64] compile-flags: --target x86_64-unknown-uefi -//[x86_64] needs-llvm-components: aarch64 arm riscv -//[i686] compile-flags: --target i686-unknown-linux-musl -//[i686] needs-llvm-components: aarch64 arm riscv -//[aarch64] compile-flags: --target aarch64-unknown-none -//[aarch64] needs-llvm-components: aarch64 arm riscv -//[arm] compile-flags: --target armv7r-none-eabi -//[arm] needs-llvm-components: aarch64 arm riscv -//[riscv] compile-flags: --target riscv64gc-unknown-none-elf -//[riscv] needs-llvm-components: aarch64 arm riscv -// compile-flags: -C no-prepopulate-passes +//@ revisions:x86_64 i686 aarch64 arm riscv +//@[x86_64] compile-flags: --target x86_64-unknown-uefi +//@[x86_64] needs-llvm-components: aarch64 arm riscv +//@[i686] compile-flags: --target i686-unknown-linux-musl +//@[i686] needs-llvm-components: aarch64 arm riscv +//@[aarch64] compile-flags: --target aarch64-unknown-none +//@[aarch64] needs-llvm-components: aarch64 arm riscv +//@[arm] compile-flags: --target armv7r-none-eabi +//@[arm] needs-llvm-components: aarch64 arm riscv +//@[riscv] compile-flags: --target riscv64gc-unknown-none-elf +//@[riscv] needs-llvm-components: aarch64 arm riscv +//@ compile-flags: -C no-prepopulate-passes #![crate_type = "lib"] #![feature(no_core, lang_items)] diff --git a/tests/codegen/abi-main-signature-16bit-c-int.rs b/tests/codegen/abi-main-signature-16bit-c-int.rs index ce4d35dea0c8..9832088ab338 100644 --- a/tests/codegen/abi-main-signature-16bit-c-int.rs +++ b/tests/codegen/abi-main-signature-16bit-c-int.rs @@ -2,9 +2,9 @@ // entry point. It must match C's `int main(int, char **)`. // This test is for targets with 16bit c_int only. -// revisions: avr msp -//[avr] only-avr -//[msp] only-msp430 +//@ revisions: avr msp +//@[avr] only-avr +//@[msp] only-msp430 fn main() { diff --git a/tests/codegen/abi-main-signature-32bit-c-int.rs b/tests/codegen/abi-main-signature-32bit-c-int.rs index 771ca66daf8e..52db3d893e1f 100644 --- a/tests/codegen/abi-main-signature-32bit-c-int.rs +++ b/tests/codegen/abi-main-signature-32bit-c-int.rs @@ -2,8 +2,8 @@ // entry point. It must match C's `int main(int, char **)`. // This test is for targets with 32bit c_int only. -// ignore-msp430 -// ignore-avr +//@ ignore-msp430 +//@ ignore-avr fn main() { } diff --git a/tests/codegen/abi-repr-ext.rs b/tests/codegen/abi-repr-ext.rs index 23ade3c7216d..2e100a372355 100644 --- a/tests/codegen/abi-repr-ext.rs +++ b/tests/codegen/abi-repr-ext.rs @@ -1,21 +1,21 @@ -// compile-flags: -O +//@ compile-flags: -O -// revisions:x86_64 i686 aarch64-apple aarch64-windows aarch64-linux arm riscv +//@ revisions:x86_64 i686 aarch64-apple aarch64-windows aarch64-linux arm riscv -//[x86_64] compile-flags: --target x86_64-unknown-uefi -//[x86_64] needs-llvm-components: x86 -//[i686] compile-flags: --target i686-unknown-linux-musl -//[i686] needs-llvm-components: x86 -//[aarch64-windows] compile-flags: --target aarch64-pc-windows-msvc -//[aarch64-windows] needs-llvm-components: aarch64 -//[aarch64-linux] compile-flags: --target aarch64-unknown-linux-gnu -//[aarch64-linux] needs-llvm-components: aarch64 -//[aarch64-apple] compile-flags: --target aarch64-apple-darwin -//[aarch64-apple] needs-llvm-components: aarch64 -//[arm] compile-flags: --target armv7r-none-eabi -//[arm] needs-llvm-components: arm -//[riscv] compile-flags: --target riscv64gc-unknown-none-elf -//[riscv] needs-llvm-components: riscv +//@[x86_64] compile-flags: --target x86_64-unknown-uefi +//@[x86_64] needs-llvm-components: x86 +//@[i686] compile-flags: --target i686-unknown-linux-musl +//@[i686] needs-llvm-components: x86 +//@[aarch64-windows] compile-flags: --target aarch64-pc-windows-msvc +//@[aarch64-windows] needs-llvm-components: aarch64 +//@[aarch64-linux] compile-flags: --target aarch64-unknown-linux-gnu +//@[aarch64-linux] needs-llvm-components: aarch64 +//@[aarch64-apple] compile-flags: --target aarch64-apple-darwin +//@[aarch64-apple] needs-llvm-components: aarch64 +//@[arm] compile-flags: --target armv7r-none-eabi +//@[arm] needs-llvm-components: arm +//@[riscv] compile-flags: --target riscv64gc-unknown-none-elf +//@[riscv] needs-llvm-components: riscv // See bottom of file for a corresponding C source file that is meant to yield // equivalent declarations. diff --git a/tests/codegen/abi-sysv64.rs b/tests/codegen/abi-sysv64.rs index 3c2d4e719d42..ec555ee5f1d9 100644 --- a/tests/codegen/abi-sysv64.rs +++ b/tests/codegen/abi-sysv64.rs @@ -2,8 +2,8 @@ // llvm. Also checks that the abi-sysv64 feature gate allows usage // of the sysv64 abi. // -// needs-llvm-components: x86 -// compile-flags: -C no-prepopulate-passes --target=x86_64-unknown-linux-gnu -Copt-level=0 +//@ needs-llvm-components: x86 +//@ compile-flags: -C no-prepopulate-passes --target=x86_64-unknown-linux-gnu -Copt-level=0 #![crate_type = "lib"] #![no_core] diff --git a/tests/codegen/abi-x86-interrupt.rs b/tests/codegen/abi-x86-interrupt.rs index 928ad5a9bbd6..b8f3ebb99dd5 100644 --- a/tests/codegen/abi-x86-interrupt.rs +++ b/tests/codegen/abi-x86-interrupt.rs @@ -2,8 +2,8 @@ // llvm. Also checks that the abi_x86_interrupt feature gate allows usage // of the x86-interrupt abi. -// needs-llvm-components: x86 -// compile-flags: -C no-prepopulate-passes --target=x86_64-unknown-linux-gnu -Copt-level=0 +//@ needs-llvm-components: x86 +//@ compile-flags: -C no-prepopulate-passes --target=x86_64-unknown-linux-gnu -Copt-level=0 #![crate_type = "lib"] #![no_core] diff --git a/tests/codegen/abi-x86_64_sysv.rs b/tests/codegen/abi-x86_64_sysv.rs index 84e06023e9c3..659c1d93e208 100644 --- a/tests/codegen/abi-x86_64_sysv.rs +++ b/tests/codegen/abi-x86_64_sysv.rs @@ -1,6 +1,6 @@ -// only-x86_64 +//@ only-x86_64 -// compile-flags: -C no-prepopulate-passes +//@ compile-flags: -C no-prepopulate-passes #![crate_type = "lib"] diff --git a/tests/codegen/addr-of-mutate.rs b/tests/codegen/addr-of-mutate.rs index 97af6181524e..f10f01274b1f 100644 --- a/tests/codegen/addr-of-mutate.rs +++ b/tests/codegen/addr-of-mutate.rs @@ -1,4 +1,4 @@ -// compile-flags: -C opt-level=3 -C no-prepopulate-passes +//@ compile-flags: -C opt-level=3 -C no-prepopulate-passes #![crate_type = "lib"] diff --git a/tests/codegen/adjustments.rs b/tests/codegen/adjustments.rs index 0739c79ba8d6..549a9737eb15 100644 --- a/tests/codegen/adjustments.rs +++ b/tests/codegen/adjustments.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes -Copt-level=0 +//@ compile-flags: -C no-prepopulate-passes -Copt-level=0 #![crate_type = "lib"] diff --git a/tests/codegen/align-byval-vector.rs b/tests/codegen/align-byval-vector.rs index 3c8be659671b..6596792ec88a 100644 --- a/tests/codegen/align-byval-vector.rs +++ b/tests/codegen/align-byval-vector.rs @@ -1,9 +1,9 @@ -// revisions:x86-linux x86-darwin +//@ revisions:x86-linux x86-darwin -//[x86-linux] compile-flags: --target i686-unknown-linux-gnu -//[x86-linux] needs-llvm-components: x86 -//[x86-darwin] compile-flags: --target i686-apple-darwin -//[x86-darwin] needs-llvm-components: x86 +//@[x86-linux] compile-flags: --target i686-unknown-linux-gnu +//@[x86-linux] needs-llvm-components: x86 +//@[x86-darwin] compile-flags: --target i686-apple-darwin +//@[x86-darwin] needs-llvm-components: x86 // Tests that aggregates containing vector types get their alignment increased to 16 on Darwin. diff --git a/tests/codegen/align-byval.rs b/tests/codegen/align-byval.rs index c6e3a8ef5f05..1016c7903eb2 100644 --- a/tests/codegen/align-byval.rs +++ b/tests/codegen/align-byval.rs @@ -1,18 +1,18 @@ // ignore-tidy-linelength -// revisions:m68k wasm x86_64-linux x86_64-windows i686-linux i686-windows +//@ revisions:m68k wasm x86_64-linux x86_64-windows i686-linux i686-windows -//[m68k] compile-flags: --target m68k-unknown-linux-gnu -//[m68k] needs-llvm-components: m68k -//[wasm] compile-flags: --target wasm32-unknown-emscripten -//[wasm] needs-llvm-components: webassembly -//[x86_64-linux] compile-flags: --target x86_64-unknown-linux-gnu -//[x86_64-linux] needs-llvm-components: x86 -//[x86_64-windows] compile-flags: --target x86_64-pc-windows-msvc -//[x86_64-windows] needs-llvm-components: x86 -//[i686-linux] compile-flags: --target i686-unknown-linux-gnu -//[i686-linux] needs-llvm-components: x86 -//[i686-windows] compile-flags: --target i686-pc-windows-msvc -//[i686-windows] needs-llvm-components: x86 +//@[m68k] compile-flags: --target m68k-unknown-linux-gnu +//@[m68k] needs-llvm-components: m68k +//@[wasm] compile-flags: --target wasm32-unknown-emscripten +//@[wasm] needs-llvm-components: webassembly +//@[x86_64-linux] compile-flags: --target x86_64-unknown-linux-gnu +//@[x86_64-linux] needs-llvm-components: x86 +//@[x86_64-windows] compile-flags: --target x86_64-pc-windows-msvc +//@[x86_64-windows] needs-llvm-components: x86 +//@[i686-linux] compile-flags: --target i686-unknown-linux-gnu +//@[i686-linux] needs-llvm-components: x86 +//@[i686-windows] compile-flags: --target i686-pc-windows-msvc +//@[i686-windows] needs-llvm-components: x86 // Tests that `byval` alignment is properly specified (#80127). // The only targets that use `byval` are m68k, wasm, x86-64, and x86. diff --git a/tests/codegen/align-enum.rs b/tests/codegen/align-enum.rs index 5901f0113c3a..17bf2cf72568 100644 --- a/tests/codegen/align-enum.rs +++ b/tests/codegen/align-enum.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes -Z mir-opt-level=0 +//@ compile-flags: -C no-prepopulate-passes -Z mir-opt-level=0 // #![crate_type = "lib"] diff --git a/tests/codegen/align-fn.rs b/tests/codegen/align-fn.rs index f3cf614e185c..97f23cc04230 100644 --- a/tests/codegen/align-fn.rs +++ b/tests/codegen/align-fn.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes -Z mir-opt-level=0 +//@ compile-flags: -C no-prepopulate-passes -Z mir-opt-level=0 #![crate_type = "lib"] #![feature(fn_align)] diff --git a/tests/codegen/align-offset.rs b/tests/codegen/align-offset.rs index d4d8b18d35b7..9819dc209668 100644 --- a/tests/codegen/align-offset.rs +++ b/tests/codegen/align-offset.rs @@ -1,5 +1,5 @@ -// compile-flags: -O -// ignore-debug (debug assertions in `slice::from_raw_parts` block optimizations) +//@ compile-flags: -O +//@ ignore-debug (debug assertions in `slice::from_raw_parts` block optimizations) #![crate_type = "lib"] diff --git a/tests/codegen/align-struct.rs b/tests/codegen/align-struct.rs index d483a2ba1516..34475a3852b7 100644 --- a/tests/codegen/align-struct.rs +++ b/tests/codegen/align-struct.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes -Z mir-opt-level=0 +//@ compile-flags: -C no-prepopulate-passes -Z mir-opt-level=0 // #![crate_type = "lib"] diff --git a/tests/codegen/alloc-optimisation.rs b/tests/codegen/alloc-optimisation.rs index 900eb687a45b..6f320e68fdb3 100644 --- a/tests/codegen/alloc-optimisation.rs +++ b/tests/codegen/alloc-optimisation.rs @@ -1,4 +1,4 @@ -// compile-flags: -O +//@ compile-flags: -O #![crate_type = "lib"] #[no_mangle] diff --git a/tests/codegen/array-clone.rs b/tests/codegen/array-clone.rs index 0d42963bcd2c..2873f3cadca8 100644 --- a/tests/codegen/array-clone.rs +++ b/tests/codegen/array-clone.rs @@ -1,4 +1,4 @@ -// compile-flags: -O +//@ compile-flags: -O #![crate_type = "lib"] diff --git a/tests/codegen/array-codegen.rs b/tests/codegen/array-codegen.rs index bf5ae74679bb..bb4bd5444dbf 100644 --- a/tests/codegen/array-codegen.rs +++ b/tests/codegen/array-codegen.rs @@ -1,4 +1,4 @@ -// compile-flags: -O -C no-prepopulate-passes +//@ compile-flags: -O -C no-prepopulate-passes #![crate_type = "lib"] diff --git a/tests/codegen/array-equality.rs b/tests/codegen/array-equality.rs index 1941452ea615..943542288863 100644 --- a/tests/codegen/array-equality.rs +++ b/tests/codegen/array-equality.rs @@ -1,5 +1,5 @@ -// compile-flags: -O -Z merge-functions=disabled -// only-x86_64 +//@ compile-flags: -O -Z merge-functions=disabled +//@ only-x86_64 #![crate_type = "lib"] diff --git a/tests/codegen/array-map.rs b/tests/codegen/array-map.rs index 9846cc7f5c83..b356f8f33f9f 100644 --- a/tests/codegen/array-map.rs +++ b/tests/codegen/array-map.rs @@ -1,6 +1,6 @@ -// compile-flags: -C opt-level=3 -C target-cpu=x86-64-v3 -// only-x86_64 -// ignore-debug (the extra assertions get in the way) +//@ compile-flags: -C opt-level=3 -C target-cpu=x86-64-v3 +//@ only-x86_64 +//@ ignore-debug (the extra assertions get in the way) #![crate_type = "lib"] diff --git a/tests/codegen/array-optimized.rs b/tests/codegen/array-optimized.rs index 27448fdcfade..4cf16f1fb302 100644 --- a/tests/codegen/array-optimized.rs +++ b/tests/codegen/array-optimized.rs @@ -1,4 +1,4 @@ -// compile-flags: -O +//@ compile-flags: -O #![crate_type = "lib"] diff --git a/tests/codegen/ascii-char.rs b/tests/codegen/ascii-char.rs index 711ffe7e1a58..30f285096ed8 100644 --- a/tests/codegen/ascii-char.rs +++ b/tests/codegen/ascii-char.rs @@ -1,5 +1,5 @@ -// compile-flags: -C opt-level=1 -// ignore-debug (the extra assertions get in the way) +//@ compile-flags: -C opt-level=1 +//@ ignore-debug (the extra assertions get in the way) #![crate_type = "lib"] #![feature(ascii_char)] diff --git a/tests/codegen/asm-clobber_abi.rs b/tests/codegen/asm-clobber_abi.rs index f70caea2fb9e..cc563474bf8c 100644 --- a/tests/codegen/asm-clobber_abi.rs +++ b/tests/codegen/asm-clobber_abi.rs @@ -1,5 +1,5 @@ -// compile-flags: -O -// only-x86_64 +//@ compile-flags: -O +//@ only-x86_64 #![crate_type = "rlib"] diff --git a/tests/codegen/asm-clobbers.rs b/tests/codegen/asm-clobbers.rs index 2ef10a2837d2..4094db741346 100644 --- a/tests/codegen/asm-clobbers.rs +++ b/tests/codegen/asm-clobbers.rs @@ -1,5 +1,5 @@ -// compile-flags: -O -// only-x86_64 +//@ compile-flags: -O +//@ only-x86_64 #![crate_type = "rlib"] diff --git a/tests/codegen/asm-may_unwind.rs b/tests/codegen/asm-may_unwind.rs index c97933035d10..be66b3975ff8 100644 --- a/tests/codegen/asm-may_unwind.rs +++ b/tests/codegen/asm-may_unwind.rs @@ -1,5 +1,5 @@ -// compile-flags: -O -// only-x86_64 +//@ compile-flags: -O +//@ only-x86_64 #![crate_type = "rlib"] #![feature(asm_unwind)] diff --git a/tests/codegen/asm-maybe-uninit.rs b/tests/codegen/asm-maybe-uninit.rs index d7e4a9489546..f9bf280b3846 100644 --- a/tests/codegen/asm-maybe-uninit.rs +++ b/tests/codegen/asm-maybe-uninit.rs @@ -1,5 +1,5 @@ -// compile-flags: -O -// only-x86_64 +//@ compile-flags: -O +//@ only-x86_64 #![crate_type = "rlib"] #![allow(asm_sub_register)] diff --git a/tests/codegen/asm-multiple-options.rs b/tests/codegen/asm-multiple-options.rs index 1ae37d627d67..1ee295e32c9e 100644 --- a/tests/codegen/asm-multiple-options.rs +++ b/tests/codegen/asm-multiple-options.rs @@ -1,5 +1,5 @@ -// compile-flags: -O -// only-x86_64 +//@ compile-flags: -O +//@ only-x86_64 #![crate_type = "rlib"] diff --git a/tests/codegen/asm-options.rs b/tests/codegen/asm-options.rs index 963b60cfe35b..96a72c2f5ae9 100644 --- a/tests/codegen/asm-options.rs +++ b/tests/codegen/asm-options.rs @@ -1,5 +1,5 @@ -// compile-flags: -O -// only-x86_64 +//@ compile-flags: -O +//@ only-x86_64 #![crate_type = "rlib"] diff --git a/tests/codegen/asm-powerpc-clobbers.rs b/tests/codegen/asm-powerpc-clobbers.rs index 10b20ba6beb0..0be1b66bd99e 100644 --- a/tests/codegen/asm-powerpc-clobbers.rs +++ b/tests/codegen/asm-powerpc-clobbers.rs @@ -1,10 +1,10 @@ -// revisions: powerpc powerpc64 powerpc64le -//[powerpc] compile-flags: --target powerpc-unknown-linux-gnu -//[powerpc] needs-llvm-components: powerpc -//[powerpc64] compile-flags: --target powerpc64-unknown-linux-gnu -//[powerpc64] needs-llvm-components: powerpc -//[powerpc64le] compile-flags: --target powerpc64le-unknown-linux-gnu -//[powerpc64le] needs-llvm-components: powerpc +//@ revisions: powerpc powerpc64 powerpc64le +//@[powerpc] compile-flags: --target powerpc-unknown-linux-gnu +//@[powerpc] needs-llvm-components: powerpc +//@[powerpc64] compile-flags: --target powerpc64-unknown-linux-gnu +//@[powerpc64] needs-llvm-components: powerpc +//@[powerpc64le] compile-flags: --target powerpc64le-unknown-linux-gnu +//@[powerpc64le] needs-llvm-components: powerpc #![crate_type = "rlib"] #![feature(no_core, rustc_attrs, lang_items, asm_experimental_arch)] diff --git a/tests/codegen/asm-sanitize-llvm.rs b/tests/codegen/asm-sanitize-llvm.rs index 41bed98038ec..8638ed2236ac 100644 --- a/tests/codegen/asm-sanitize-llvm.rs +++ b/tests/codegen/asm-sanitize-llvm.rs @@ -1,6 +1,6 @@ // FIXME(nagisa): remove the flags below once all targets support `asm!`. -// compile-flags: --target x86_64-unknown-linux-gnu -Copt-level=0 -// needs-llvm-components: x86 +//@ compile-flags: --target x86_64-unknown-linux-gnu -Copt-level=0 +//@ needs-llvm-components: x86 // Verify we sanitize the special tokens for the LLVM inline-assembly, ensuring people won't // inadvertently rely on the LLVM-specific syntax and features. diff --git a/tests/codegen/asm-target-clobbers.rs b/tests/codegen/asm-target-clobbers.rs index ac30e18ec523..119372491ffe 100644 --- a/tests/codegen/asm-target-clobbers.rs +++ b/tests/codegen/asm-target-clobbers.rs @@ -1,6 +1,6 @@ -// only-x86_64 -// revisions: base avx512 -// [avx512]compile-flags: -C target-feature=+avx512f +//@ only-x86_64 +//@ revisions: base avx512 +//@ [avx512]compile-flags: -C target-feature=+avx512f #![crate_type = "rlib"] diff --git a/tests/codegen/async-closure-debug.rs b/tests/codegen/async-closure-debug.rs index 6718d2b66272..9cb1e623295b 100644 --- a/tests/codegen/async-closure-debug.rs +++ b/tests/codegen/async-closure-debug.rs @@ -1,7 +1,7 @@ // Just make sure that async closures don't ICE. // -// compile-flags: -C debuginfo=2 --edition=2018 -// ignore-msvc +//@ compile-flags: -C debuginfo=2 --edition=2018 +//@ ignore-msvc // CHECK-DAG: [[GEN_FN:!.*]] = !DINamespace(name: "async_closure_test" // CHECK-DAG: [[CLOSURE:!.*]] = !DICompositeType(tag: DW_TAG_structure_type, name: "{closure_env#0}", scope: [[GEN_FN]] diff --git a/tests/codegen/async-fn-debug-awaitee-field.rs b/tests/codegen/async-fn-debug-awaitee-field.rs index 03cc46cdcde5..d1a7d738e9e1 100644 --- a/tests/codegen/async-fn-debug-awaitee-field.rs +++ b/tests/codegen/async-fn-debug-awaitee-field.rs @@ -3,7 +3,7 @@ // extensions rely on the field having this name. // ignore-tidy-linelength -// compile-flags: -C debuginfo=2 --edition=2018 -Copt-level=0 +//@ compile-flags: -C debuginfo=2 --edition=2018 -Copt-level=0 #![crate_type = "lib"] diff --git a/tests/codegen/async-fn-debug-msvc.rs b/tests/codegen/async-fn-debug-msvc.rs index 707a0d277407..7c695042b425 100644 --- a/tests/codegen/async-fn-debug-msvc.rs +++ b/tests/codegen/async-fn-debug-msvc.rs @@ -4,8 +4,8 @@ // - Other fields are not marked artificial // // -// compile-flags: -C debuginfo=2 --edition=2018 -// only-msvc +//@ compile-flags: -C debuginfo=2 --edition=2018 +//@ only-msvc async fn foo() {} async fn async_fn_test() { diff --git a/tests/codegen/async-fn-debug.rs b/tests/codegen/async-fn-debug.rs index 9f6058a71b34..7be4ad456657 100644 --- a/tests/codegen/async-fn-debug.rs +++ b/tests/codegen/async-fn-debug.rs @@ -4,8 +4,8 @@ // - Other fields are not marked artificial // // -// compile-flags: -C debuginfo=2 --edition=2018 -// ignore-msvc +//@ compile-flags: -C debuginfo=2 --edition=2018 +//@ ignore-msvc async fn foo() {} async fn async_fn_test() { diff --git a/tests/codegen/atomic-operations.rs b/tests/codegen/atomic-operations.rs index 20980c48960b..b13502735422 100644 --- a/tests/codegen/atomic-operations.rs +++ b/tests/codegen/atomic-operations.rs @@ -1,5 +1,5 @@ // Code generation of atomic operations. -// compile-flags: -O +//@ compile-flags: -O #![crate_type = "lib"] use std::sync::atomic::{AtomicI32, Ordering::*}; diff --git a/tests/codegen/autovectorize-f32x4.rs b/tests/codegen/autovectorize-f32x4.rs index 54392be707f5..90c9f3691045 100644 --- a/tests/codegen/autovectorize-f32x4.rs +++ b/tests/codegen/autovectorize-f32x4.rs @@ -1,5 +1,5 @@ -// compile-flags: -C opt-level=3 -Z merge-functions=disabled -// only-x86_64 +//@ compile-flags: -C opt-level=3 -Z merge-functions=disabled +//@ only-x86_64 #![crate_type = "lib"] // CHECK-LABEL: @auto_vectorize_direct diff --git a/tests/codegen/avr/avr-func-addrspace.rs b/tests/codegen/avr/avr-func-addrspace.rs index dc36a9fac8c2..fb53abecfdb2 100644 --- a/tests/codegen/avr/avr-func-addrspace.rs +++ b/tests/codegen/avr/avr-func-addrspace.rs @@ -1,5 +1,5 @@ -// compile-flags: -O --target=avr-unknown-gnu-atmega328 --crate-type=rlib -// needs-llvm-components: avr +//@ compile-flags: -O --target=avr-unknown-gnu-atmega328 --crate-type=rlib +//@ needs-llvm-components: avr // This test validates that function pointers can be stored in global variables // and called upon. It ensures that Rust emits function pointers in the correct diff --git a/tests/codegen/binary-search-index-no-bound-check.rs b/tests/codegen/binary-search-index-no-bound-check.rs index 595969a89793..d2627d67142f 100644 --- a/tests/codegen/binary-search-index-no-bound-check.rs +++ b/tests/codegen/binary-search-index-no-bound-check.rs @@ -1,5 +1,5 @@ -// compile-flags: -O -// ignore-debug: the debug assertions get in the way +//@ compile-flags: -O +//@ ignore-debug: the debug assertions get in the way #![crate_type = "lib"] // Make sure no bounds checks are emitted when slicing or indexing diff --git a/tests/codegen/bool-cmp.rs b/tests/codegen/bool-cmp.rs index 5090f7c378c3..29ee3e0627bc 100644 --- a/tests/codegen/bool-cmp.rs +++ b/tests/codegen/bool-cmp.rs @@ -1,7 +1,7 @@ // This is a test for optimal Ord trait implementation for bool. // See for more info. -// compile-flags: -C opt-level=3 +//@ compile-flags: -C opt-level=3 #![crate_type = "lib"] diff --git a/tests/codegen/box-uninit-bytes.rs b/tests/codegen/box-uninit-bytes.rs index 732da0a17949..63a6c7b84156 100644 --- a/tests/codegen/box-uninit-bytes.rs +++ b/tests/codegen/box-uninit-bytes.rs @@ -1,4 +1,4 @@ -// compile-flags: -O +//@ compile-flags: -O #![crate_type = "lib"] use std::mem::MaybeUninit; diff --git a/tests/codegen/bpf-alu32.rs b/tests/codegen/bpf-alu32.rs index c68bffd03e28..5955bf3317f0 100644 --- a/tests/codegen/bpf-alu32.rs +++ b/tests/codegen/bpf-alu32.rs @@ -1,4 +1,4 @@ -// only-bpf +//@ only-bpf #![crate_type = "lib"] #![feature(bpf_target_feature)] #![no_std] diff --git a/tests/codegen/branch-protection.rs b/tests/codegen/branch-protection.rs index 994c71b26198..0961b1b9f522 100644 --- a/tests/codegen/branch-protection.rs +++ b/tests/codegen/branch-protection.rs @@ -1,12 +1,12 @@ // Test that the correct module flags are emitted with different branch protection flags. -// revisions: BTI PACRET LEAF BKEY NONE -// needs-llvm-components: aarch64 -// [BTI] compile-flags: -Z branch-protection=bti -// [PACRET] compile-flags: -Z branch-protection=pac-ret -// [LEAF] compile-flags: -Z branch-protection=pac-ret,leaf -// [BKEY] compile-flags: -Z branch-protection=pac-ret,b-key -// compile-flags: --target aarch64-unknown-linux-gnu +//@ revisions: BTI PACRET LEAF BKEY NONE +//@ needs-llvm-components: aarch64 +//@ [BTI] compile-flags: -Z branch-protection=bti +//@ [PACRET] compile-flags: -Z branch-protection=pac-ret +//@ [LEAF] compile-flags: -Z branch-protection=pac-ret,leaf +//@ [BKEY] compile-flags: -Z branch-protection=pac-ret,b-key +//@ compile-flags: --target aarch64-unknown-linux-gnu #![crate_type = "lib"] #![feature(no_core, lang_items)] diff --git a/tests/codegen/call-llvm-intrinsics.rs b/tests/codegen/call-llvm-intrinsics.rs index 11f2917717c7..dc7e0249cb6a 100644 --- a/tests/codegen/call-llvm-intrinsics.rs +++ b/tests/codegen/call-llvm-intrinsics.rs @@ -1,7 +1,7 @@ -// compile-flags: -C no-prepopulate-passes -Copt-level=0 +//@ compile-flags: -C no-prepopulate-passes -Copt-level=0 -// ignore-riscv64 -// ignore-loongarch64 +//@ ignore-riscv64 +//@ ignore-loongarch64 #![feature(link_llvm_intrinsics)] #![crate_type = "lib"] diff --git a/tests/codegen/call-metadata.rs b/tests/codegen/call-metadata.rs index 07cc0c963717..b2168990ff83 100644 --- a/tests/codegen/call-metadata.rs +++ b/tests/codegen/call-metadata.rs @@ -1,7 +1,7 @@ // Checks that range metadata gets emitted on calls to functions returning a // scalar value. -// compile-flags: -O -C no-prepopulate-passes +//@ compile-flags: -O -C no-prepopulate-passes #![crate_type = "lib"] diff --git a/tests/codegen/catch-unwind.rs b/tests/codegen/catch-unwind.rs index 6b63b83ef459..4e1f9a88e957 100644 --- a/tests/codegen/catch-unwind.rs +++ b/tests/codegen/catch-unwind.rs @@ -1,4 +1,4 @@ -// compile-flags: -O +//@ compile-flags: -O // On x86 the closure is inlined in foo() producing something like // define i32 @foo() [...] { @@ -7,11 +7,11 @@ // } // On riscv the closure is another function, placed before fn foo so CHECK can't // find it -// ignore-riscv64 FIXME +//@ ignore-riscv64 FIXME // On s390x the closure is also in another function -// ignore-s390x FIXME +//@ ignore-s390x FIXME // On loongarch64 the closure is also in another function -// ignore-loongarch64 FIXME +//@ ignore-loongarch64 FIXME #![crate_type = "lib"] #![feature(c_unwind)] diff --git a/tests/codegen/cdylib-external-inline-fns.rs b/tests/codegen/cdylib-external-inline-fns.rs index 9118afd43d88..2e472ea68e87 100644 --- a/tests/codegen/cdylib-external-inline-fns.rs +++ b/tests/codegen/cdylib-external-inline-fns.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes +//@ compile-flags: -C no-prepopulate-passes #![crate_type = "cdylib"] diff --git a/tests/codegen/cf-protection.rs b/tests/codegen/cf-protection.rs index ccbc863f5717..5120bbf114d9 100644 --- a/tests/codegen/cf-protection.rs +++ b/tests/codegen/cf-protection.rs @@ -1,13 +1,13 @@ // Test that the correct module flags are emitted with different control-flow protection flags. -// revisions: undefined none branch return full -// needs-llvm-components: x86 -// [undefined] compile-flags: -// [none] compile-flags: -Z cf-protection=none -// [branch] compile-flags: -Z cf-protection=branch -// [return] compile-flags: -Z cf-protection=return -// [full] compile-flags: -Z cf-protection=full -// compile-flags: --target x86_64-unknown-linux-gnu +//@ revisions: undefined none branch return full +//@ needs-llvm-components: x86 +//@ [undefined] compile-flags: +//@ [none] compile-flags: -Z cf-protection=none +//@ [branch] compile-flags: -Z cf-protection=branch +//@ [return] compile-flags: -Z cf-protection=return +//@ [full] compile-flags: -Z cf-protection=full +//@ compile-flags: --target x86_64-unknown-linux-gnu #![crate_type = "lib"] #![feature(no_core, lang_items)] diff --git a/tests/codegen/cffi/c-variadic-opt.rs b/tests/codegen/cffi/c-variadic-opt.rs index 969dce80f587..7e544ee7f37d 100644 --- a/tests/codegen/cffi/c-variadic-opt.rs +++ b/tests/codegen/cffi/c-variadic-opt.rs @@ -1,4 +1,4 @@ -// compile-flags: -C opt-level=3 +//@ compile-flags: -C opt-level=3 #![crate_type = "lib"] #![feature(c_variadic)] diff --git a/tests/codegen/cffi/c-variadic.rs b/tests/codegen/cffi/c-variadic.rs index cab32652210d..74aed36a8a1a 100644 --- a/tests/codegen/cffi/c-variadic.rs +++ b/tests/codegen/cffi/c-variadic.rs @@ -1,5 +1,5 @@ -// ignore-wasm32-bare compiled with panic=abort by default -// compile-flags: -C no-prepopulate-passes -Copt-level=0 +//@ ignore-wasm32-bare compiled with panic=abort by default +//@ compile-flags: -C no-prepopulate-passes -Copt-level=0 // #![crate_type = "lib"] diff --git a/tests/codegen/cffi/ffi-const.rs b/tests/codegen/cffi/ffi-const.rs index 937205034808..8044ad105d5d 100644 --- a/tests/codegen/cffi/ffi-const.rs +++ b/tests/codegen/cffi/ffi-const.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes +//@ compile-flags: -C no-prepopulate-passes #![crate_type = "lib"] #![feature(ffi_const)] diff --git a/tests/codegen/cffi/ffi-out-of-bounds-loads.rs b/tests/codegen/cffi/ffi-out-of-bounds-loads.rs index 099726b2f086..7eda6cf4d576 100644 --- a/tests/codegen/cffi/ffi-out-of-bounds-loads.rs +++ b/tests/codegen/cffi/ffi-out-of-bounds-loads.rs @@ -1,8 +1,8 @@ // Regression test for #29988 -// compile-flags: -C no-prepopulate-passes -// only-x86_64 -// ignore-windows +//@ compile-flags: -C no-prepopulate-passes +//@ only-x86_64 +//@ ignore-windows #[repr(C)] struct S { diff --git a/tests/codegen/cffi/ffi-pure.rs b/tests/codegen/cffi/ffi-pure.rs index 2ed735813582..51135fd37535 100644 --- a/tests/codegen/cffi/ffi-pure.rs +++ b/tests/codegen/cffi/ffi-pure.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes +//@ compile-flags: -C no-prepopulate-passes #![crate_type = "lib"] #![feature(ffi_pure)] diff --git a/tests/codegen/cfguard-checks.rs b/tests/codegen/cfguard-checks.rs index 571a2654bcbf..2b09a5fe12c2 100644 --- a/tests/codegen/cfguard-checks.rs +++ b/tests/codegen/cfguard-checks.rs @@ -1,5 +1,5 @@ -// compile-flags: -C control-flow-guard=checks -// only-msvc +//@ compile-flags: -C control-flow-guard=checks +//@ only-msvc #![crate_type = "lib"] diff --git a/tests/codegen/cfguard-disabled.rs b/tests/codegen/cfguard-disabled.rs index c3f8f4116819..105e02072615 100644 --- a/tests/codegen/cfguard-disabled.rs +++ b/tests/codegen/cfguard-disabled.rs @@ -1,5 +1,5 @@ -// compile-flags: -C control-flow-guard=no -// only-msvc +//@ compile-flags: -C control-flow-guard=no +//@ only-msvc #![crate_type = "lib"] diff --git a/tests/codegen/cfguard-nochecks.rs b/tests/codegen/cfguard-nochecks.rs index 3847c3e81ed7..0443880d72da 100644 --- a/tests/codegen/cfguard-nochecks.rs +++ b/tests/codegen/cfguard-nochecks.rs @@ -1,5 +1,5 @@ -// compile-flags: -C control-flow-guard=nochecks -// only-msvc +//@ compile-flags: -C control-flow-guard=nochecks +//@ only-msvc #![crate_type = "lib"] diff --git a/tests/codegen/cfguard-non-msvc.rs b/tests/codegen/cfguard-non-msvc.rs index 6278a951e35f..5d266de8a94d 100644 --- a/tests/codegen/cfguard-non-msvc.rs +++ b/tests/codegen/cfguard-non-msvc.rs @@ -1,5 +1,5 @@ -// compile-flags: -C control-flow-guard -// ignore-msvc +//@ compile-flags: -C control-flow-guard +//@ ignore-msvc #![crate_type = "lib"] diff --git a/tests/codegen/char-ascii-branchless.rs b/tests/codegen/char-ascii-branchless.rs index b612b24c7c73..76d2f617ed1c 100644 --- a/tests/codegen/char-ascii-branchless.rs +++ b/tests/codegen/char-ascii-branchless.rs @@ -1,6 +1,6 @@ // Checks that these functions are branchless. // -// compile-flags: -O +//@ compile-flags: -O #![crate_type = "lib"] diff --git a/tests/codegen/codemodels.rs b/tests/codegen/codemodels.rs index 2328f5feb4e1..06d2eade78ae 100644 --- a/tests/codegen/codemodels.rs +++ b/tests/codegen/codemodels.rs @@ -1,11 +1,11 @@ -// only-x86_64 +//@ only-x86_64 -// revisions: NOMODEL MODEL-SMALL MODEL-KERNEL MODEL-MEDIUM MODEL-LARGE -//[NOMODEL] compile-flags: -//[MODEL-SMALL] compile-flags: -C code-model=small -//[MODEL-KERNEL] compile-flags: -C code-model=kernel -//[MODEL-MEDIUM] compile-flags: -C code-model=medium -//[MODEL-LARGE] compile-flags: -C code-model=large +//@ revisions: NOMODEL MODEL-SMALL MODEL-KERNEL MODEL-MEDIUM MODEL-LARGE +//@[NOMODEL] compile-flags: +//@[MODEL-SMALL] compile-flags: -C code-model=small +//@[MODEL-KERNEL] compile-flags: -C code-model=kernel +//@[MODEL-MEDIUM] compile-flags: -C code-model=medium +//@[MODEL-LARGE] compile-flags: -C code-model=large #![crate_type = "lib"] diff --git a/tests/codegen/coercions.rs b/tests/codegen/coercions.rs index d645ca6b13ae..a205e541df10 100644 --- a/tests/codegen/coercions.rs +++ b/tests/codegen/coercions.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes +//@ compile-flags: -C no-prepopulate-passes #![crate_type = "lib"] diff --git a/tests/codegen/cold-call-declare-and-call.rs b/tests/codegen/cold-call-declare-and-call.rs index 572dc407f513..cd41c0a6dfb6 100644 --- a/tests/codegen/cold-call-declare-and-call.rs +++ b/tests/codegen/cold-call-declare-and-call.rs @@ -1,8 +1,8 @@ -// revisions: NORMAL WINDOWS -// compile-flags: -C no-prepopulate-passes -//[NORMAL] ignore-windows -//[WINDOWS] only-windows -//[WINDOWS] only-x86_64 +//@ revisions: NORMAL WINDOWS +//@ compile-flags: -C no-prepopulate-passes +//@[NORMAL] ignore-windows +//@[WINDOWS] only-windows +//@[WINDOWS] only-x86_64 #![crate_type = "lib"] #![feature(rust_cold_cc)] diff --git a/tests/codegen/comparison-operators-2-tuple.rs b/tests/codegen/comparison-operators-2-tuple.rs index 633cfe3a8ac3..8e2915e84eb7 100644 --- a/tests/codegen/comparison-operators-2-tuple.rs +++ b/tests/codegen/comparison-operators-2-tuple.rs @@ -1,5 +1,5 @@ -// compile-flags: -C opt-level=1 -Z merge-functions=disabled -// only-x86_64 +//@ compile-flags: -C opt-level=1 -Z merge-functions=disabled +//@ only-x86_64 #![crate_type = "lib"] diff --git a/tests/codegen/comparison-operators-newtype.rs b/tests/codegen/comparison-operators-newtype.rs index 8fd8a81dfeb9..d336c4e6ed3d 100644 --- a/tests/codegen/comparison-operators-newtype.rs +++ b/tests/codegen/comparison-operators-newtype.rs @@ -2,7 +2,7 @@ // This double-checks that the `Option` intermediate values used // in the operators for such a type all optimize away. -// compile-flags: -C opt-level=1 +//@ compile-flags: -C opt-level=1 #![crate_type = "lib"] diff --git a/tests/codegen/const_scalar_pair.rs b/tests/codegen/const_scalar_pair.rs index aa4cf7a64d5c..0aa430a8efa0 100644 --- a/tests/codegen/const_scalar_pair.rs +++ b/tests/codegen/const_scalar_pair.rs @@ -1,4 +1,4 @@ -// compile-flags: --crate-type=lib -Copt-level=0 -Zmir-opt-level=0 -C debuginfo=2 +//@ compile-flags: --crate-type=lib -Copt-level=0 -Zmir-opt-level=0 -C debuginfo=2 #![feature(inline_const)] diff --git a/tests/codegen/consts.rs b/tests/codegen/consts.rs index 3797e1a99da7..93c58c37c287 100644 --- a/tests/codegen/consts.rs +++ b/tests/codegen/consts.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes +//@ compile-flags: -C no-prepopulate-passes #![crate_type = "lib"] diff --git a/tests/codegen/coroutine-debug-msvc.rs b/tests/codegen/coroutine-debug-msvc.rs index 6d16e7576c1a..fb1b46fe497f 100644 --- a/tests/codegen/coroutine-debug-msvc.rs +++ b/tests/codegen/coroutine-debug-msvc.rs @@ -4,8 +4,8 @@ // - Other fields are not marked artificial // // -// compile-flags: -C debuginfo=2 -// only-msvc +//@ compile-flags: -C debuginfo=2 +//@ only-msvc #![feature(coroutines, coroutine_trait)] use std::ops::Coroutine; diff --git a/tests/codegen/coroutine-debug.rs b/tests/codegen/coroutine-debug.rs index b060f3bfac7a..7eaee669559e 100644 --- a/tests/codegen/coroutine-debug.rs +++ b/tests/codegen/coroutine-debug.rs @@ -4,8 +4,8 @@ // - Other fields are not marked artificial // // -// compile-flags: -C debuginfo=2 --edition=2018 -// ignore-msvc +//@ compile-flags: -C debuginfo=2 --edition=2018 +//@ ignore-msvc #![feature(coroutines, coroutine_trait)] use std::ops::Coroutine; diff --git a/tests/codegen/cross-crate-inlining/always-inline.rs b/tests/codegen/cross-crate-inlining/always-inline.rs index f3f08bf116ae..d3a35dadb67b 100644 --- a/tests/codegen/cross-crate-inlining/always-inline.rs +++ b/tests/codegen/cross-crate-inlining/always-inline.rs @@ -1,5 +1,5 @@ -// compile-flags: -O -// aux-build:always.rs +//@ compile-flags: -O +//@ aux-build:always.rs #![crate_type = "lib"] diff --git a/tests/codegen/cross-crate-inlining/auxiliary/always.rs b/tests/codegen/cross-crate-inlining/auxiliary/always.rs index 3670307ec813..7f524e17d34a 100644 --- a/tests/codegen/cross-crate-inlining/auxiliary/always.rs +++ b/tests/codegen/cross-crate-inlining/auxiliary/always.rs @@ -1,4 +1,4 @@ -// compile-flags: -O -Zcross-crate-inline-threshold=always +//@ compile-flags: -O -Zcross-crate-inline-threshold=always #![crate_type = "lib"] diff --git a/tests/codegen/cross-crate-inlining/auxiliary/leaf.rs b/tests/codegen/cross-crate-inlining/auxiliary/leaf.rs index 963f087f22d4..5895812b5ee5 100644 --- a/tests/codegen/cross-crate-inlining/auxiliary/leaf.rs +++ b/tests/codegen/cross-crate-inlining/auxiliary/leaf.rs @@ -1,4 +1,4 @@ -// compile-flags: -O +//@ compile-flags: -O #![crate_type = "lib"] diff --git a/tests/codegen/cross-crate-inlining/auxiliary/never.rs b/tests/codegen/cross-crate-inlining/auxiliary/never.rs index e222a6dea387..3a391608df84 100644 --- a/tests/codegen/cross-crate-inlining/auxiliary/never.rs +++ b/tests/codegen/cross-crate-inlining/auxiliary/never.rs @@ -1,4 +1,4 @@ -// compile-flags: -O -Zcross-crate-inline-threshold=never +//@ compile-flags: -O -Zcross-crate-inline-threshold=never #![crate_type = "lib"] diff --git a/tests/codegen/cross-crate-inlining/leaf-inlining.rs b/tests/codegen/cross-crate-inlining/leaf-inlining.rs index 73b1a520b06c..b47898f750a2 100644 --- a/tests/codegen/cross-crate-inlining/leaf-inlining.rs +++ b/tests/codegen/cross-crate-inlining/leaf-inlining.rs @@ -1,5 +1,5 @@ -// compile-flags: -O -Zcross-crate-inline-threshold=yes -// aux-build:leaf.rs +//@ compile-flags: -O -Zcross-crate-inline-threshold=yes +//@ aux-build:leaf.rs #![crate_type = "lib"] diff --git a/tests/codegen/cross-crate-inlining/never-inline.rs b/tests/codegen/cross-crate-inlining/never-inline.rs index 4e7bc3e5154c..eedf90ceec0f 100644 --- a/tests/codegen/cross-crate-inlining/never-inline.rs +++ b/tests/codegen/cross-crate-inlining/never-inline.rs @@ -1,5 +1,5 @@ -// compile-flags: -O -// aux-build:never.rs +//@ compile-flags: -O +//@ aux-build:never.rs #![crate_type = "lib"] diff --git a/tests/codegen/dealloc-no-unwind.rs b/tests/codegen/dealloc-no-unwind.rs index c2656908f16d..667f6fea1857 100644 --- a/tests/codegen/dealloc-no-unwind.rs +++ b/tests/codegen/dealloc-no-unwind.rs @@ -1,4 +1,4 @@ -// compile-flags: -O +//@ compile-flags: -O #![crate_type="lib"] diff --git a/tests/codegen/debug-accessibility/crate-enum.rs b/tests/codegen/debug-accessibility/crate-enum.rs index eeea18dd8153..c80700d7b282 100644 --- a/tests/codegen/debug-accessibility/crate-enum.rs +++ b/tests/codegen/debug-accessibility/crate-enum.rs @@ -1,4 +1,4 @@ -// compile-flags: -C debuginfo=2 +//@ compile-flags: -C debuginfo=2 // ignore-tidy-linelength #![allow(dead_code)] diff --git a/tests/codegen/debug-accessibility/crate-struct.rs b/tests/codegen/debug-accessibility/crate-struct.rs index 68d126a3478f..73a8ce852eda 100644 --- a/tests/codegen/debug-accessibility/crate-struct.rs +++ b/tests/codegen/debug-accessibility/crate-struct.rs @@ -1,4 +1,4 @@ -// compile-flags: -C debuginfo=2 +//@ compile-flags: -C debuginfo=2 #![allow(dead_code)] diff --git a/tests/codegen/debug-accessibility/private-enum.rs b/tests/codegen/debug-accessibility/private-enum.rs index 7f81026ddecc..22d49a40eff0 100644 --- a/tests/codegen/debug-accessibility/private-enum.rs +++ b/tests/codegen/debug-accessibility/private-enum.rs @@ -1,4 +1,4 @@ -// compile-flags: -C debuginfo=2 +//@ compile-flags: -C debuginfo=2 // ignore-tidy-linelength #![allow(dead_code)] diff --git a/tests/codegen/debug-accessibility/private-struct.rs b/tests/codegen/debug-accessibility/private-struct.rs index 43b260f90247..488a680e81c0 100644 --- a/tests/codegen/debug-accessibility/private-struct.rs +++ b/tests/codegen/debug-accessibility/private-struct.rs @@ -1,4 +1,4 @@ -// compile-flags: -C debuginfo=2 +//@ compile-flags: -C debuginfo=2 #![allow(dead_code)] diff --git a/tests/codegen/debug-accessibility/public-enum.rs b/tests/codegen/debug-accessibility/public-enum.rs index 29ae5fd64210..f16ccf1a3c96 100644 --- a/tests/codegen/debug-accessibility/public-enum.rs +++ b/tests/codegen/debug-accessibility/public-enum.rs @@ -1,4 +1,4 @@ -// compile-flags: -C debuginfo=2 +//@ compile-flags: -C debuginfo=2 // ignore-tidy-linelength #![allow(dead_code)] diff --git a/tests/codegen/debug-accessibility/public-struct.rs b/tests/codegen/debug-accessibility/public-struct.rs index e7cd9b40d097..8b2a53f993c1 100644 --- a/tests/codegen/debug-accessibility/public-struct.rs +++ b/tests/codegen/debug-accessibility/public-struct.rs @@ -1,4 +1,4 @@ -// compile-flags: -C debuginfo=2 +//@ compile-flags: -C debuginfo=2 #![allow(dead_code)] diff --git a/tests/codegen/debug-accessibility/struct-fields.rs b/tests/codegen/debug-accessibility/struct-fields.rs index 76831bdc6c6a..f68bb3438be2 100644 --- a/tests/codegen/debug-accessibility/struct-fields.rs +++ b/tests/codegen/debug-accessibility/struct-fields.rs @@ -1,4 +1,4 @@ -// compile-flags: -C debuginfo=2 +//@ compile-flags: -C debuginfo=2 #![allow(dead_code)] diff --git a/tests/codegen/debug-accessibility/super-enum.rs b/tests/codegen/debug-accessibility/super-enum.rs index 9d83fb45bd0b..1b6d7d793ed5 100644 --- a/tests/codegen/debug-accessibility/super-enum.rs +++ b/tests/codegen/debug-accessibility/super-enum.rs @@ -1,4 +1,4 @@ -// compile-flags: -C debuginfo=2 +//@ compile-flags: -C debuginfo=2 // ignore-tidy-linelength #![allow(dead_code)] diff --git a/tests/codegen/debug-accessibility/super-struct.rs b/tests/codegen/debug-accessibility/super-struct.rs index 481006c39650..63954bfb2031 100644 --- a/tests/codegen/debug-accessibility/super-struct.rs +++ b/tests/codegen/debug-accessibility/super-struct.rs @@ -1,4 +1,4 @@ -// compile-flags: -C debuginfo=2 +//@ compile-flags: -C debuginfo=2 #![allow(dead_code)] diff --git a/tests/codegen/debug-accessibility/tuple-fields.rs b/tests/codegen/debug-accessibility/tuple-fields.rs index 1163ba2c7c32..feec6e9eb41f 100644 --- a/tests/codegen/debug-accessibility/tuple-fields.rs +++ b/tests/codegen/debug-accessibility/tuple-fields.rs @@ -1,4 +1,4 @@ -// compile-flags: -C debuginfo=2 +//@ compile-flags: -C debuginfo=2 #![allow(dead_code)] diff --git a/tests/codegen/debug-alignment.rs b/tests/codegen/debug-alignment.rs index f6c1062e0fc6..02fe05832a3d 100644 --- a/tests/codegen/debug-alignment.rs +++ b/tests/codegen/debug-alignment.rs @@ -1,6 +1,6 @@ // Verifies that DWARF alignment is specified properly. // -// compile-flags: -C debuginfo=2 +//@ compile-flags: -C debuginfo=2 #![crate_type = "lib"] // CHECK: !DIGlobalVariable diff --git a/tests/codegen/debug-column-msvc.rs b/tests/codegen/debug-column-msvc.rs index aad8b372a8a9..39f77f413290 100644 --- a/tests/codegen/debug-column-msvc.rs +++ b/tests/codegen/debug-column-msvc.rs @@ -1,7 +1,7 @@ // Verify that no column information is emitted for MSVC targets // -// only-msvc -// compile-flags: -C debuginfo=2 +//@ only-msvc +//@ compile-flags: -C debuginfo=2 // CHECK-NOT: !DILexicalBlock({{.*}}column: {{.*}}) // CHECK-NOT: !DILocation({{.*}}column: {{.*}}) diff --git a/tests/codegen/debug-column.rs b/tests/codegen/debug-column.rs index f3b19a2eb2f4..ff25fbe1b132 100644 --- a/tests/codegen/debug-column.rs +++ b/tests/codegen/debug-column.rs @@ -1,7 +1,7 @@ // Verify that debuginfo column numbers are 1-based byte offsets. // -// ignore-windows -// compile-flags: -C debuginfo=2 +//@ ignore-windows +//@ compile-flags: -C debuginfo=2 fn main() { unsafe { diff --git a/tests/codegen/debug-compile-unit-path.rs b/tests/codegen/debug-compile-unit-path.rs index 3661be046d0f..4be418d66103 100644 --- a/tests/codegen/debug-compile-unit-path.rs +++ b/tests/codegen/debug-compile-unit-path.rs @@ -1,4 +1,4 @@ -// compile-flags: -g --remap-path-prefix={{cwd}}=/cwd/ --remap-path-prefix={{src-base}}=/base/ +//@ compile-flags: -g --remap-path-prefix={{cwd}}=/cwd/ --remap-path-prefix={{src-base}}=/base/ // // // Ensure that we remap the compile unit directory and that we set it to the compilers current diff --git a/tests/codegen/debug-fndef-size.rs b/tests/codegen/debug-fndef-size.rs index 80eb35fa32a9..b3cc45614bc5 100644 --- a/tests/codegen/debug-fndef-size.rs +++ b/tests/codegen/debug-fndef-size.rs @@ -1,6 +1,6 @@ // Verify that `i32::cmp` FnDef type is declared with size 0 and align 1 in LLVM debuginfo. -// compile-flags: -O -g -Cno-prepopulate-passes -// ignore-msvc the types are mangled differently +//@ compile-flags: -O -g -Cno-prepopulate-passes +//@ ignore-msvc the types are mangled differently use std::cmp::Ordering; diff --git a/tests/codegen/debug-limited.rs b/tests/codegen/debug-limited.rs index 48d676887fdd..89a4ef0ca90b 100644 --- a/tests/codegen/debug-limited.rs +++ b/tests/codegen/debug-limited.rs @@ -1,6 +1,6 @@ // Verify that the limited debuginfo option emits llvm's FullDebugInfo, but no type info. // -// compile-flags: -C debuginfo=limited +//@ compile-flags: -C debuginfo=limited #[repr(C)] struct StructType { diff --git a/tests/codegen/debug-line-directives-only.rs b/tests/codegen/debug-line-directives-only.rs index 750bdd49de07..709c8789bf87 100644 --- a/tests/codegen/debug-line-directives-only.rs +++ b/tests/codegen/debug-line-directives-only.rs @@ -1,6 +1,6 @@ // Verify that the only debuginfo generated are the line directives. // -// compile-flags: -C debuginfo=line-directives-only +//@ compile-flags: -C debuginfo=line-directives-only #[repr(C)] struct StructType { diff --git a/tests/codegen/debug-line-tables-only.rs b/tests/codegen/debug-line-tables-only.rs index 3ed165a6f696..d50bffe6e60d 100644 --- a/tests/codegen/debug-line-tables-only.rs +++ b/tests/codegen/debug-line-tables-only.rs @@ -1,6 +1,6 @@ // Verify that the only debuginfo generated are the line tables. // -// compile-flags: -C debuginfo=line-tables-only +//@ compile-flags: -C debuginfo=line-tables-only #[repr(C)] struct StructType { diff --git a/tests/codegen/debug-linkage-name.rs b/tests/codegen/debug-linkage-name.rs index 9bf4d521fc01..e706040f3313 100644 --- a/tests/codegen/debug-linkage-name.rs +++ b/tests/codegen/debug-linkage-name.rs @@ -1,8 +1,8 @@ // Verifies that linkage name is omitted when it is // the same as variable / function name. // -// compile-flags: -C no-prepopulate-passes -Copt-level=0 -// compile-flags: -C debuginfo=2 -Copt-level=0 +//@ compile-flags: -C no-prepopulate-passes -Copt-level=0 +//@ compile-flags: -C debuginfo=2 -Copt-level=0 #![crate_type = "lib"] pub mod xyz { diff --git a/tests/codegen/debug-vtable.rs b/tests/codegen/debug-vtable.rs index e52392b260bd..036fff6cd237 100644 --- a/tests/codegen/debug-vtable.rs +++ b/tests/codegen/debug-vtable.rs @@ -6,7 +6,7 @@ // legacy mangling scheme rustc version and generic parameters are both hashed into a single part // of the name, thus randomizing item order with respect to rustc version. -// compile-flags: -Cdebuginfo=2 -Copt-level=0 -Csymbol-mangling-version=v0 +//@ compile-flags: -Cdebuginfo=2 -Copt-level=0 -Csymbol-mangling-version=v0 // ignore-tidy-linelength // Make sure that vtables don't have the unnamed_addr attribute when debuginfo is enabled. diff --git a/tests/codegen/debuginfo-constant-locals.rs b/tests/codegen/debuginfo-constant-locals.rs index 95a1b8c9d214..f607e0dd08bf 100644 --- a/tests/codegen/debuginfo-constant-locals.rs +++ b/tests/codegen/debuginfo-constant-locals.rs @@ -1,4 +1,4 @@ -// compile-flags: -g -O +//@ compile-flags: -g -O // Check that simple constant values are preserved in debuginfo across both MIR opts and LLVM opts diff --git a/tests/codegen/debuginfo-generic-closure-env-names.rs b/tests/codegen/debuginfo-generic-closure-env-names.rs index b29f8b4a029d..04ff7fff4399 100644 --- a/tests/codegen/debuginfo-generic-closure-env-names.rs +++ b/tests/codegen/debuginfo-generic-closure-env-names.rs @@ -15,7 +15,7 @@ // legacy mangling scheme rustc version and generic parameters are both hashed into a single part // of the name, thus randomizing item order with respect to rustc version. -// compile-flags: -Cdebuginfo=2 --edition 2021 -Copt-level=0 -Csymbol-mangling-version=v0 +//@ compile-flags: -Cdebuginfo=2 --edition 2021 -Copt-level=0 -Csymbol-mangling-version=v0 // non_generic_closure() // NONMSVC: !DICompositeType(tag: DW_TAG_structure_type, name: "{closure_env#0}", scope: ![[non_generic_closure_NAMESPACE:[0-9]+]], diff --git a/tests/codegen/debuginfo-inline-callsite-location.rs b/tests/codegen/debuginfo-inline-callsite-location.rs index d529f9ccead5..833e8c0df912 100644 --- a/tests/codegen/debuginfo-inline-callsite-location.rs +++ b/tests/codegen/debuginfo-inline-callsite-location.rs @@ -1,4 +1,4 @@ -// compile-flags: -g -O +//@ compile-flags: -g -O // Check that each inline call site for the same function uses the same "sub-program" so that LLVM // can correctly merge the debug info if it merges the inlined code (e.g., for merging of tail diff --git a/tests/codegen/deduced-param-attrs.rs b/tests/codegen/deduced-param-attrs.rs index 153046eef3c7..5e7c571b63f8 100644 --- a/tests/codegen/deduced-param-attrs.rs +++ b/tests/codegen/deduced-param-attrs.rs @@ -1,4 +1,4 @@ -// compile-flags: -O +//@ compile-flags: -O #![crate_type = "lib"] #![allow(incomplete_features)] diff --git a/tests/codegen/default-hidden-visibility.rs b/tests/codegen/default-hidden-visibility.rs index 9e5e545f0d93..2bea8f62a40d 100644 --- a/tests/codegen/default-hidden-visibility.rs +++ b/tests/codegen/default-hidden-visibility.rs @@ -3,9 +3,9 @@ // also https://github.com/rust-lang/rust/issues/73295 and // https://github.com/rust-lang/rust/issues/37530. -// revisions:DEFAULT YES NO -//[YES] compile-flags: -Zdefault-hidden-visibility=yes -//[NO] compile-flags: -Zdefault-hidden-visibility=no +//@ revisions:DEFAULT YES NO +//@[YES] compile-flags: -Zdefault-hidden-visibility=yes +//@[NO] compile-flags: -Zdefault-hidden-visibility=no // The test scenario is specifically about visibility of symbols exported out of dynamically linked // libraries. @@ -24,7 +24,7 @@ pub static tested_symbol: [u8; 6] = *b"foobar"; // additional targets can be covered by adding copies of this test file with // a different `only-X` directive. // -// only-x86_64-unknown-linux-gnu +//@ only-x86_64-unknown-linux-gnu // DEFAULT: @{{.*}}default_hidden_visibility{{.*}}tested_symbol{{.*}} = constant // YES: @{{.*}}default_hidden_visibility{{.*}}tested_symbol{{.*}} = hidden constant diff --git a/tests/codegen/default-requires-uwtable.rs b/tests/codegen/default-requires-uwtable.rs index 26424f03568b..567bd55ecc3f 100644 --- a/tests/codegen/default-requires-uwtable.rs +++ b/tests/codegen/default-requires-uwtable.rs @@ -1,9 +1,9 @@ -// revisions: WINDOWS ANDROID -// compile-flags: -C panic=abort -Copt-level=0 -// [WINDOWS] compile-flags: --target=x86_64-pc-windows-msvc -// [WINDOWS] needs-llvm-components: x86 -// [ANDROID] compile-flags: --target=armv7-linux-androideabi -// [ANDROID] needs-llvm-components: arm +//@ revisions: WINDOWS ANDROID +//@ compile-flags: -C panic=abort -Copt-level=0 +//@ [WINDOWS] compile-flags: --target=x86_64-pc-windows-msvc +//@ [WINDOWS] needs-llvm-components: x86 +//@ [ANDROID] compile-flags: --target=armv7-linux-androideabi +//@ [ANDROID] needs-llvm-components: arm #![feature(no_core, lang_items)] #![crate_type = "lib"] diff --git a/tests/codegen/direct-access-external-data.rs b/tests/codegen/direct-access-external-data.rs index ec4bfc33518d..5b2ff41ef052 100644 --- a/tests/codegen/direct-access-external-data.rs +++ b/tests/codegen/direct-access-external-data.rs @@ -1,9 +1,9 @@ -// only-loongarch64-unknown-linux-gnu +//@ only-loongarch64-unknown-linux-gnu -// revisions: DEFAULT DIRECT INDIRECT -// [DEFAULT] compile-flags: -C relocation-model=static -// [DIRECT] compile-flags: -C relocation-model=static -Z direct-access-external-data=yes -// [INDIRECT] compile-flags: -C relocation-model=static -Z direct-access-external-data=no +//@ revisions: DEFAULT DIRECT INDIRECT +//@ [DEFAULT] compile-flags: -C relocation-model=static +//@ [DIRECT] compile-flags: -C relocation-model=static -Z direct-access-external-data=yes +//@ [INDIRECT] compile-flags: -C relocation-model=static -Z direct-access-external-data=no #![crate_type = "rlib"] diff --git a/tests/codegen/dllimports/auxiliary/dummy.rs b/tests/codegen/dllimports/auxiliary/dummy.rs index 113a164f1457..ab3dbc6a3009 100644 --- a/tests/codegen/dllimports/auxiliary/dummy.rs +++ b/tests/codegen/dllimports/auxiliary/dummy.rs @@ -1,4 +1,4 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic #![crate_type = "staticlib"] // Since codegen tests don't actually perform linking, this library doesn't need to export diff --git a/tests/codegen/dllimports/auxiliary/wrapper.rs b/tests/codegen/dllimports/auxiliary/wrapper.rs index 7aa90920a3ed..7d1f6ab70d5f 100644 --- a/tests/codegen/dllimports/auxiliary/wrapper.rs +++ b/tests/codegen/dllimports/auxiliary/wrapper.rs @@ -1,4 +1,4 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic #![crate_type = "rlib"] #[link(name = "dummy", kind="dylib")] diff --git a/tests/codegen/dllimports/main.rs b/tests/codegen/dllimports/main.rs index 383940e95906..c1626853b16d 100644 --- a/tests/codegen/dllimports/main.rs +++ b/tests/codegen/dllimports/main.rs @@ -1,9 +1,9 @@ // This test is for *-windows-msvc only. -// only-windows -// ignore-gnu +//@ only-windows +//@ ignore-gnu -// aux-build:dummy.rs -// aux-build:wrapper.rs +//@ aux-build:dummy.rs +//@ aux-build:wrapper.rs extern crate wrapper; diff --git a/tests/codegen/drop-in-place-noalias.rs b/tests/codegen/drop-in-place-noalias.rs index ece1e426c087..36532ea8f532 100644 --- a/tests/codegen/drop-in-place-noalias.rs +++ b/tests/codegen/drop-in-place-noalias.rs @@ -1,4 +1,4 @@ -// compile-flags: -O -C no-prepopulate-passes +//@ compile-flags: -O -C no-prepopulate-passes // Tests that the compiler can apply `noalias` and other &mut attributes to `drop_in_place`. // Note that non-Unpin types should not get `noalias`, matching &mut behavior. diff --git a/tests/codegen/drop.rs b/tests/codegen/drop.rs index 14b5840e2fe2..93e54979a05f 100644 --- a/tests/codegen/drop.rs +++ b/tests/codegen/drop.rs @@ -1,6 +1,6 @@ -// ignore-wasm32-bare compiled with panic=abort by default -// needs-unwind - this test verifies the amount of drop calls when unwinding is used -// compile-flags: -C no-prepopulate-passes +//@ ignore-wasm32-bare compiled with panic=abort by default +//@ needs-unwind - this test verifies the amount of drop calls when unwinding is used +//@ compile-flags: -C no-prepopulate-passes #![crate_type = "lib"] diff --git a/tests/codegen/dst-vtable-align-nonzero.rs b/tests/codegen/dst-vtable-align-nonzero.rs index 54f6e7f992fe..b0507f4c217d 100644 --- a/tests/codegen/dst-vtable-align-nonzero.rs +++ b/tests/codegen/dst-vtable-align-nonzero.rs @@ -1,4 +1,4 @@ -// compile-flags: -O -Z merge-functions=disabled +//@ compile-flags: -O -Z merge-functions=disabled #![crate_type = "lib"] #![feature(core_intrinsics)] diff --git a/tests/codegen/dst-vtable-size-range.rs b/tests/codegen/dst-vtable-size-range.rs index 671c8abdebd2..69d8e68497ca 100644 --- a/tests/codegen/dst-vtable-size-range.rs +++ b/tests/codegen/dst-vtable-size-range.rs @@ -1,4 +1,4 @@ -// compile-flags: -O -Z merge-functions=disabled +//@ compile-flags: -O -Z merge-functions=disabled #![crate_type = "lib"] #![feature(core_intrinsics)] diff --git a/tests/codegen/ehcontguard_disabled.rs b/tests/codegen/ehcontguard_disabled.rs index 7773384e5ead..dc4b5eb430bf 100644 --- a/tests/codegen/ehcontguard_disabled.rs +++ b/tests/codegen/ehcontguard_disabled.rs @@ -1,4 +1,4 @@ -// compile-flags: +//@ compile-flags: #![crate_type = "lib"] diff --git a/tests/codegen/ehcontguard_enabled.rs b/tests/codegen/ehcontguard_enabled.rs index 03aaa342b967..fde66f1c148e 100644 --- a/tests/codegen/ehcontguard_enabled.rs +++ b/tests/codegen/ehcontguard_enabled.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z ehcont-guard +//@ compile-flags: -Z ehcont-guard #![crate_type = "lib"] diff --git a/tests/codegen/enable-lto-unit-splitting.rs b/tests/codegen/enable-lto-unit-splitting.rs index 7daa05f69d19..e46980944778 100644 --- a/tests/codegen/enable-lto-unit-splitting.rs +++ b/tests/codegen/enable-lto-unit-splitting.rs @@ -1,6 +1,6 @@ // Verifies that "EnableSplitLTOUnit" module flag is added. // -// compile-flags: -Clto -Ctarget-feature=-crt-static -Zsplit-lto-unit +//@ compile-flags: -Clto -Ctarget-feature=-crt-static -Zsplit-lto-unit #![crate_type="lib"] diff --git a/tests/codegen/enum/enum-bounds-check-derived-idx.rs b/tests/codegen/enum/enum-bounds-check-derived-idx.rs index aa66c2ed08ed..15280cb2e6c8 100644 --- a/tests/codegen/enum/enum-bounds-check-derived-idx.rs +++ b/tests/codegen/enum/enum-bounds-check-derived-idx.rs @@ -1,6 +1,6 @@ // This test checks an optimization that is not guaranteed to work. This test case should not block // a future LLVM update. -// compile-flags: -O +//@ compile-flags: -O #![crate_type = "lib"] diff --git a/tests/codegen/enum/enum-bounds-check-issue-13926.rs b/tests/codegen/enum/enum-bounds-check-issue-13926.rs index b26945bc5494..b60ff38ce392 100644 --- a/tests/codegen/enum/enum-bounds-check-issue-13926.rs +++ b/tests/codegen/enum/enum-bounds-check-issue-13926.rs @@ -1,6 +1,6 @@ // This test checks an optimization that is not guaranteed to work. This test case should not block // a future LLVM update. -// compile-flags: -O +//@ compile-flags: -O #![crate_type = "lib"] diff --git a/tests/codegen/enum/enum-bounds-check-issue-82871.rs b/tests/codegen/enum/enum-bounds-check-issue-82871.rs index 32fdc4a5f4fa..3b8a146838aa 100644 --- a/tests/codegen/enum/enum-bounds-check-issue-82871.rs +++ b/tests/codegen/enum/enum-bounds-check-issue-82871.rs @@ -1,4 +1,4 @@ -// compile-flags: -C opt-level=0 +//@ compile-flags: -C opt-level=0 #![crate_type = "lib"] diff --git a/tests/codegen/enum/enum-bounds-check.rs b/tests/codegen/enum/enum-bounds-check.rs index 17322d5911b9..a1b32ec9295b 100644 --- a/tests/codegen/enum/enum-bounds-check.rs +++ b/tests/codegen/enum/enum-bounds-check.rs @@ -1,4 +1,4 @@ -// compile-flags: -O +//@ compile-flags: -O #![crate_type = "lib"] diff --git a/tests/codegen/enum/enum-debug-clike.rs b/tests/codegen/enum/enum-debug-clike.rs index 1e369a2c4e6a..205c57d1456e 100644 --- a/tests/codegen/enum/enum-debug-clike.rs +++ b/tests/codegen/enum/enum-debug-clike.rs @@ -2,9 +2,9 @@ // This is ignored for the fallback mode on MSVC due to problems with PDB. // -// ignore-msvc +//@ ignore-msvc -// compile-flags: -g -C no-prepopulate-passes +//@ compile-flags: -g -C no-prepopulate-passes // CHECK-LABEL: @main // CHECK: {{.*}}DICompositeType{{.*}}tag: DW_TAG_enumeration_type,{{.*}}name: "E",{{.*}}flags: DIFlagEnumClass,{{.*}} diff --git a/tests/codegen/enum/enum-debug-niche-2.rs b/tests/codegen/enum/enum-debug-niche-2.rs index 4b607d505745..4315741e0bdd 100644 --- a/tests/codegen/enum/enum-debug-niche-2.rs +++ b/tests/codegen/enum/enum-debug-niche-2.rs @@ -2,9 +2,9 @@ // This is ignored for the fallback mode on MSVC due to problems with PDB. // -// ignore-msvc +//@ ignore-msvc -// compile-flags: -g -C no-prepopulate-passes +//@ compile-flags: -g -C no-prepopulate-passes // CHECK: {{.*}}DICompositeType{{.*}}tag: DW_TAG_variant_part,{{.*}}size: 32,{{.*}} // CHECK: {{.*}}DIDerivedType{{.*}}tag: DW_TAG_member,{{.*}}name: "Placeholder",{{.*}}extraData: i128 4294967295{{[,)].*}} diff --git a/tests/codegen/enum/enum-debug-niche.rs b/tests/codegen/enum/enum-debug-niche.rs index b718a6854dd7..fc6a73e84721 100644 --- a/tests/codegen/enum/enum-debug-niche.rs +++ b/tests/codegen/enum/enum-debug-niche.rs @@ -1,9 +1,9 @@ // This tests that optimized enum debug info accurately reflects the enum layout. // This is ignored for the fallback mode on MSVC due to problems with PDB. -// ignore-msvc +//@ ignore-msvc -// compile-flags: -g -C no-prepopulate-passes +//@ compile-flags: -g -C no-prepopulate-passes // CHECK-LABEL: @main // CHECK: {{.*}}DICompositeType{{.*}}tag: DW_TAG_variant_part,{{.*}}discriminator:{{.*}} diff --git a/tests/codegen/enum/enum-debug-tagged.rs b/tests/codegen/enum/enum-debug-tagged.rs index 095c49ac3acb..87a6ccae2913 100644 --- a/tests/codegen/enum/enum-debug-tagged.rs +++ b/tests/codegen/enum/enum-debug-tagged.rs @@ -1,9 +1,9 @@ // This tests that debug info for tagged (ordinary) enums is properly emitted. // This is ignored for the fallback mode on MSVC due to problems with PDB. -// ignore-msvc +//@ ignore-msvc -// compile-flags: -g -C no-prepopulate-passes +//@ compile-flags: -g -C no-prepopulate-passes // CHECK-LABEL: @main // CHECK: {{.*}}DICompositeType{{.*}}tag: DW_TAG_structure_type,{{.*}}name: "E",{{.*}} diff --git a/tests/codegen/enum/enum-discriminant-value.rs b/tests/codegen/enum/enum-discriminant-value.rs index cc14c2120025..d6b0c6d6c108 100644 --- a/tests/codegen/enum/enum-discriminant-value.rs +++ b/tests/codegen/enum/enum-discriminant-value.rs @@ -1,6 +1,6 @@ // Verify that DIEnumerator uses isUnsigned flag when appropriate. // -// compile-flags: -g -C no-prepopulate-passes +//@ compile-flags: -g -C no-prepopulate-passes #[repr(i64)] pub enum I64 { diff --git a/tests/codegen/enum/enum-match.rs b/tests/codegen/enum/enum-match.rs index 5548cd251478..2e6dad8791b2 100644 --- a/tests/codegen/enum/enum-match.rs +++ b/tests/codegen/enum/enum-match.rs @@ -1,5 +1,5 @@ -// compile-flags: -Copt-level=1 -// only-x86_64 +//@ compile-flags: -Copt-level=1 +//@ only-x86_64 #![crate_type = "lib"] diff --git a/tests/codegen/enum/enum-u128.rs b/tests/codegen/enum/enum-u128.rs index f50d360ac9f3..94e80e34068c 100644 --- a/tests/codegen/enum/enum-u128.rs +++ b/tests/codegen/enum/enum-u128.rs @@ -2,9 +2,9 @@ // This is ignored for the fallback mode on MSVC due to problems with PDB. // -// ignore-msvc +//@ ignore-msvc -// compile-flags: -g -C no-prepopulate-passes +//@ compile-flags: -g -C no-prepopulate-passes // CHECK-LABEL: @main // CHECK: {{.*}}DICompositeType{{.*}}tag: DW_TAG_enumeration_type,{{.*}}name: "Foo",{{.*}}flags: DIFlagEnumClass,{{.*}} diff --git a/tests/codegen/export-no-mangle.rs b/tests/codegen/export-no-mangle.rs index a89d48ee1533..5040684f52ec 100644 --- a/tests/codegen/export-no-mangle.rs +++ b/tests/codegen/export-no-mangle.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes +//@ compile-flags: -C no-prepopulate-passes #![crate_type = "lib"] diff --git a/tests/codegen/external-no-mangle-fns.rs b/tests/codegen/external-no-mangle-fns.rs index 70349b2ec4f6..35ab0fd79097 100644 --- a/tests/codegen/external-no-mangle-fns.rs +++ b/tests/codegen/external-no-mangle-fns.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes +//@ compile-flags: -C no-prepopulate-passes // `#[no_mangle]`d functions always have external linkage, i.e., no `internal` in their `define`s #![crate_type = "lib"] diff --git a/tests/codegen/external-no-mangle-statics.rs b/tests/codegen/external-no-mangle-statics.rs index 48023a2a901c..a44867ff9230 100644 --- a/tests/codegen/external-no-mangle-statics.rs +++ b/tests/codegen/external-no-mangle-statics.rs @@ -1,8 +1,8 @@ -// revisions: lib staticlib -// ignore-emscripten default visibility is hidden -// compile-flags: -O -// [lib] compile-flags: --crate-type lib -// [staticlib] compile-flags: --crate-type staticlib +//@ revisions: lib staticlib +//@ ignore-emscripten default visibility is hidden +//@ compile-flags: -O +//@ [lib] compile-flags: --crate-type lib +//@ [staticlib] compile-flags: --crate-type staticlib // `#[no_mangle]`d static variables always have external linkage, i.e., no `internal` in their // definitions diff --git a/tests/codegen/fastcall-inreg.rs b/tests/codegen/fastcall-inreg.rs index ab19efa45bf9..2459ec1539e4 100644 --- a/tests/codegen/fastcall-inreg.rs +++ b/tests/codegen/fastcall-inreg.rs @@ -2,8 +2,8 @@ // as "inreg" like the C/C++ compilers for the platforms. // x86 only. -// compile-flags: --target i686-unknown-linux-gnu -O -C no-prepopulate-passes -// needs-llvm-components: x86 +//@ compile-flags: --target i686-unknown-linux-gnu -O -C no-prepopulate-passes +//@ needs-llvm-components: x86 #![crate_type = "lib"] #![no_core] diff --git a/tests/codegen/fatptr.rs b/tests/codegen/fatptr.rs index 1c49b5714ef5..0f13e66fbad0 100644 --- a/tests/codegen/fatptr.rs +++ b/tests/codegen/fatptr.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes +//@ compile-flags: -C no-prepopulate-passes #![crate_type = "lib"] diff --git a/tests/codegen/fewer-names.rs b/tests/codegen/fewer-names.rs index 05643fab96a1..b14dd30482c5 100644 --- a/tests/codegen/fewer-names.rs +++ b/tests/codegen/fewer-names.rs @@ -1,7 +1,7 @@ -// compile-flags: -Coverflow-checks=no -O -// revisions: YES NO -// [YES]compile-flags: -Zfewer-names=yes -// [NO] compile-flags: -Zfewer-names=no +//@ compile-flags: -Coverflow-checks=no -O +//@ revisions: YES NO +//@ [YES]compile-flags: -Zfewer-names=yes +//@ [NO] compile-flags: -Zfewer-names=no #![crate_type = "lib"] #[no_mangle] diff --git a/tests/codegen/float_math.rs b/tests/codegen/float_math.rs index 592e09452df6..dcca51c2f5eb 100644 --- a/tests/codegen/float_math.rs +++ b/tests/codegen/float_math.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes +//@ compile-flags: -C no-prepopulate-passes #![crate_type = "lib"] #![feature(core_intrinsics)] diff --git a/tests/codegen/fn-impl-trait-self.rs b/tests/codegen/fn-impl-trait-self.rs index 0abc8a409ed7..9f10762d8fa7 100644 --- a/tests/codegen/fn-impl-trait-self.rs +++ b/tests/codegen/fn-impl-trait-self.rs @@ -1,4 +1,4 @@ -// compile-flags: -g +//@ compile-flags: -g // // CHECK-LABEL: @main // MSVC: {{.*}}DIDerivedType(tag: DW_TAG_pointer_type, name: "recursive_type$ (*)()",{{.*}} diff --git a/tests/codegen/force-frame-pointers.rs b/tests/codegen/force-frame-pointers.rs index 5791ae47937b..c41824e024fd 100644 --- a/tests/codegen/force-frame-pointers.rs +++ b/tests/codegen/force-frame-pointers.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes -C force-frame-pointers=y -Copt-level=0 +//@ compile-flags: -C no-prepopulate-passes -C force-frame-pointers=y -Copt-level=0 #![crate_type="lib"] diff --git a/tests/codegen/force-no-unwind-tables.rs b/tests/codegen/force-no-unwind-tables.rs index 3ee23f05eb2b..0189ae7c0a68 100644 --- a/tests/codegen/force-no-unwind-tables.rs +++ b/tests/codegen/force-no-unwind-tables.rs @@ -1,5 +1,5 @@ -// compile-flags: -C no-prepopulate-passes -C panic=abort -C force-unwind-tables=n -// ignore-windows +//@ compile-flags: -C no-prepopulate-passes -C panic=abort -C force-unwind-tables=n +//@ ignore-windows #![crate_type="lib"] diff --git a/tests/codegen/force-unwind-tables.rs b/tests/codegen/force-unwind-tables.rs index c904978c9ff2..33fdf7653f49 100644 --- a/tests/codegen/force-unwind-tables.rs +++ b/tests/codegen/force-unwind-tables.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes -C force-unwind-tables=y -Copt-level=0 +//@ compile-flags: -C no-prepopulate-passes -C force-unwind-tables=y -Copt-level=0 #![crate_type="lib"] diff --git a/tests/codegen/frame-pointer.rs b/tests/codegen/frame-pointer.rs index d8933262e528..879535bcc368 100644 --- a/tests/codegen/frame-pointer.rs +++ b/tests/codegen/frame-pointer.rs @@ -1,15 +1,15 @@ -// compile-flags: --crate-type=rlib -Copt-level=0 -// revisions: aarch64-apple aarch64-linux force x64-apple x64-linux -// [aarch64-apple] needs-llvm-components: aarch64 -// [aarch64-apple] compile-flags: --target=aarch64-apple-darwin -// [aarch64-linux] needs-llvm-components: aarch64 -// [aarch64-linux] compile-flags: --target=aarch64-unknown-linux-gnu -// [force] needs-llvm-components: x86 -// [force] compile-flags: --target=x86_64-unknown-linux-gnu -Cforce-frame-pointers=yes -// [x64-apple] needs-llvm-components: x86 -// [x64-apple] compile-flags: --target=x86_64-apple-darwin -// [x64-linux] needs-llvm-components: x86 -// [x64-linux] compile-flags: --target=x86_64-unknown-linux-gnu +//@ compile-flags: --crate-type=rlib -Copt-level=0 +//@ revisions: aarch64-apple aarch64-linux force x64-apple x64-linux +//@ [aarch64-apple] needs-llvm-components: aarch64 +//@ [aarch64-apple] compile-flags: --target=aarch64-apple-darwin +//@ [aarch64-linux] needs-llvm-components: aarch64 +//@ [aarch64-linux] compile-flags: --target=aarch64-unknown-linux-gnu +//@ [force] needs-llvm-components: x86 +//@ [force] compile-flags: --target=x86_64-unknown-linux-gnu -Cforce-frame-pointers=yes +//@ [x64-apple] needs-llvm-components: x86 +//@ [x64-apple] compile-flags: --target=x86_64-apple-darwin +//@ [x64-linux] needs-llvm-components: x86 +//@ [x64-linux] compile-flags: --target=x86_64-unknown-linux-gnu #![feature(no_core, lang_items)] #![no_core] diff --git a/tests/codegen/function-arguments-noopt.rs b/tests/codegen/function-arguments-noopt.rs index 1bd735cc1af3..e99ceddfb728 100644 --- a/tests/codegen/function-arguments-noopt.rs +++ b/tests/codegen/function-arguments-noopt.rs @@ -1,4 +1,4 @@ -// compile-flags: -C opt-level=0 -C no-prepopulate-passes +//@ compile-flags: -C opt-level=0 -C no-prepopulate-passes // This test checks that arguments/returns in opt-level=0 builds, // while lacking attributes used for optimization, still have ABI-affecting attributes. diff --git a/tests/codegen/function-arguments.rs b/tests/codegen/function-arguments.rs index 64ebd3c05afe..88cedcf46b69 100644 --- a/tests/codegen/function-arguments.rs +++ b/tests/codegen/function-arguments.rs @@ -1,4 +1,4 @@ -// compile-flags: -O -C no-prepopulate-passes +//@ compile-flags: -O -C no-prepopulate-passes #![crate_type = "lib"] #![feature(dyn_star)] diff --git a/tests/codegen/function-return.rs b/tests/codegen/function-return.rs index d832d19ac392..0ca1a41ee867 100644 --- a/tests/codegen/function-return.rs +++ b/tests/codegen/function-return.rs @@ -1,13 +1,13 @@ // Test that the `fn_ret_thunk_extern` function attribute is (not) emitted when // the `-Zfunction-return={keep,thunk-extern}` flag is (not) set. -// revisions: unset keep thunk-extern keep-thunk-extern thunk-extern-keep -// needs-llvm-components: x86 -// compile-flags: --target x86_64-unknown-linux-gnu -// [keep] compile-flags: -Zfunction-return=keep -// [thunk-extern] compile-flags: -Zfunction-return=thunk-extern -// [keep-thunk-extern] compile-flags: -Zfunction-return=keep -Zfunction-return=thunk-extern -// [thunk-extern-keep] compile-flags: -Zfunction-return=thunk-extern -Zfunction-return=keep +//@ revisions: unset keep thunk-extern keep-thunk-extern thunk-extern-keep +//@ needs-llvm-components: x86 +//@ compile-flags: --target x86_64-unknown-linux-gnu +//@ [keep] compile-flags: -Zfunction-return=keep +//@ [thunk-extern] compile-flags: -Zfunction-return=thunk-extern +//@ [keep-thunk-extern] compile-flags: -Zfunction-return=keep -Zfunction-return=thunk-extern +//@ [thunk-extern-keep] compile-flags: -Zfunction-return=thunk-extern -Zfunction-return=keep #![crate_type = "lib"] #![feature(no_core, lang_items)] diff --git a/tests/codegen/gdb_debug_script_load.rs b/tests/codegen/gdb_debug_script_load.rs index 002be8d1b419..f15defeaca8b 100644 --- a/tests/codegen/gdb_debug_script_load.rs +++ b/tests/codegen/gdb_debug_script_load.rs @@ -1,10 +1,10 @@ // -// ignore-windows -// ignore-macos -// ignore-wasm -// ignore-emscripten +//@ ignore-windows +//@ ignore-macos +//@ ignore-wasm +//@ ignore-emscripten -// compile-flags: -g -C no-prepopulate-passes +//@ compile-flags: -g -C no-prepopulate-passes #![feature(start)] diff --git a/tests/codegen/generic-debug.rs b/tests/codegen/generic-debug.rs index eea16805c596..87a0ddfea93f 100644 --- a/tests/codegen/generic-debug.rs +++ b/tests/codegen/generic-debug.rs @@ -1,6 +1,6 @@ -// ignore-windows +//@ ignore-windows -// compile-flags: -g -C no-prepopulate-passes +//@ compile-flags: -g -C no-prepopulate-passes // CHECK-LABEL: @main // CHECK: {{.*}}DICompositeType{{.*}}tag: DW_TAG_structure_type,{{.*}}name: "Generic",{{.*}} diff --git a/tests/codegen/global_asm.rs b/tests/codegen/global_asm.rs index 4c2ccf4e0e95..32075daa3cf2 100644 --- a/tests/codegen/global_asm.rs +++ b/tests/codegen/global_asm.rs @@ -1,7 +1,7 @@ -// revisions: x32 x64 -//[x32] only-x86 -//[x64] only-x86_64 -// compile-flags: -C no-prepopulate-passes +//@ revisions: x32 x64 +//@[x32] only-x86 +//@[x64] only-x86_64 +//@ compile-flags: -C no-prepopulate-passes #![crate_type = "lib"] diff --git a/tests/codegen/global_asm_include.rs b/tests/codegen/global_asm_include.rs index 0fede8c71e44..98be9c3e3332 100644 --- a/tests/codegen/global_asm_include.rs +++ b/tests/codegen/global_asm_include.rs @@ -1,7 +1,7 @@ -// revisions: x32 x64 -//[x32] only-x86 -//[x64] only-x86_64 -// compile-flags: -C no-prepopulate-passes +//@ revisions: x32 x64 +//@[x32] only-x86 +//@[x64] only-x86_64 +//@ compile-flags: -C no-prepopulate-passes #![crate_type = "lib"] diff --git a/tests/codegen/global_asm_x2.rs b/tests/codegen/global_asm_x2.rs index 1fc2825b2bd4..9e3a00f06805 100644 --- a/tests/codegen/global_asm_x2.rs +++ b/tests/codegen/global_asm_x2.rs @@ -1,7 +1,7 @@ -// revisions: x32 x64 -//[x32] only-x86 -//[x64] only-x86_64 -// compile-flags: -C no-prepopulate-passes +//@ revisions: x32 x64 +//@[x32] only-x86 +//@[x64] only-x86_64 +//@ compile-flags: -C no-prepopulate-passes #![crate_type = "lib"] #![no_std] diff --git a/tests/codegen/i128-x86-align.rs b/tests/codegen/i128-x86-align.rs index aaf5785dc9ff..9cc5c3d3ed7b 100644 --- a/tests/codegen/i128-x86-align.rs +++ b/tests/codegen/i128-x86-align.rs @@ -1,5 +1,5 @@ -// only-x86_64 -// compile-flags: -O -C no-prepopulate-passes --crate-type=lib +//@ only-x86_64 +//@ compile-flags: -O -C no-prepopulate-passes --crate-type=lib // On LLVM 17 and earlier LLVM's own data layout specifies that i128 has 8 byte alignment, // while rustc wants it to have 16 byte alignment. This test checks that we handle this diff --git a/tests/codegen/infallible-unwrap-in-opt-z.rs b/tests/codegen/infallible-unwrap-in-opt-z.rs index e8ab77f8d20d..cbcba03ad0a9 100644 --- a/tests/codegen/infallible-unwrap-in-opt-z.rs +++ b/tests/codegen/infallible-unwrap-in-opt-z.rs @@ -1,5 +1,5 @@ -// compile-flags: -C opt-level=z --edition=2021 -// ignore-debug +//@ compile-flags: -C opt-level=z --edition=2021 +//@ ignore-debug #![crate_type = "lib"] diff --git a/tests/codegen/inherit_overflow.rs b/tests/codegen/inherit_overflow.rs index fa9ee0ae12a1..f08071aaa618 100644 --- a/tests/codegen/inherit_overflow.rs +++ b/tests/codegen/inherit_overflow.rs @@ -1,7 +1,7 @@ -// compile-flags: -Zmir-enable-passes=+Inline,+GVN --crate-type lib -// revisions: ASSERT NOASSERT -//[ASSERT] compile-flags: -Coverflow-checks=on -//[NOASSERT] compile-flags: -Coverflow-checks=off +//@ compile-flags: -Zmir-enable-passes=+Inline,+GVN --crate-type lib +//@ revisions: ASSERT NOASSERT +//@[ASSERT] compile-flags: -Coverflow-checks=on +//@[NOASSERT] compile-flags: -Coverflow-checks=off // CHECK-LABEL: define{{.*}} @assertion // ASSERT: call void @{{.*4core9panicking5panic}} diff --git a/tests/codegen/inline-always-works-always.rs b/tests/codegen/inline-always-works-always.rs index 912af782a8f3..e9ca05d17569 100644 --- a/tests/codegen/inline-always-works-always.rs +++ b/tests/codegen/inline-always-works-always.rs @@ -1,7 +1,7 @@ -// revisions: NO-OPT SIZE-OPT SPEED-OPT -//[NO-OPT] compile-flags: -Copt-level=0 -//[SIZE-OPT] compile-flags: -Copt-level=s -//[SPEED-OPT] compile-flags: -Copt-level=3 +//@ revisions: NO-OPT SIZE-OPT SPEED-OPT +//@[NO-OPT] compile-flags: -Copt-level=0 +//@[SIZE-OPT] compile-flags: -Copt-level=s +//@[SPEED-OPT] compile-flags: -Copt-level=3 #![crate_type="rlib"] diff --git a/tests/codegen/inline-debuginfo.rs b/tests/codegen/inline-debuginfo.rs index 5b230361f397..b6ea489f99f8 100644 --- a/tests/codegen/inline-debuginfo.rs +++ b/tests/codegen/inline-debuginfo.rs @@ -1,5 +1,5 @@ #![crate_type="rlib"] -// compile-flags: -Copt-level=3 -g +//@ compile-flags: -Copt-level=3 -g // #[no_mangle] diff --git a/tests/codegen/inline-function-args-debug-info.rs b/tests/codegen/inline-function-args-debug-info.rs index ffae99e0f24e..7263374b22e1 100644 --- a/tests/codegen/inline-function-args-debug-info.rs +++ b/tests/codegen/inline-function-args-debug-info.rs @@ -2,7 +2,7 @@ // gets inlined by MIR inlining. Without function argument indexes, `info args` in gdb won't show // arguments and their values for the current function. -// compile-flags: -Zinline-mir=yes -Cdebuginfo=2 --edition=2021 +//@ compile-flags: -Zinline-mir=yes -Cdebuginfo=2 --edition=2021 #![crate_type = "lib"] diff --git a/tests/codegen/inline-hint.rs b/tests/codegen/inline-hint.rs index bb2a8e6a649d..3d46885d5a24 100644 --- a/tests/codegen/inline-hint.rs +++ b/tests/codegen/inline-hint.rs @@ -1,7 +1,7 @@ // Checks that closures, constructors, and shims except // for a drop glue receive inline hint by default. // -// compile-flags: -Cno-prepopulate-passes -Csymbol-mangling-version=v0 -Zinline-mir=no +//@ compile-flags: -Cno-prepopulate-passes -Csymbol-mangling-version=v0 -Zinline-mir=no #![crate_type = "lib"] pub fn f() { diff --git a/tests/codegen/instrument-coverage-off.rs b/tests/codegen/instrument-coverage-off.rs index ca803beec0b1..fda3c541a25f 100644 --- a/tests/codegen/instrument-coverage-off.rs +++ b/tests/codegen/instrument-coverage-off.rs @@ -1,12 +1,12 @@ // Test that `-Cinstrument-coverage=off` does not add coverage instrumentation to LLVM IR. -// needs-profiler-support -// revisions: n no off false zero -// [n] compile-flags: -Cinstrument-coverage=n -// [no] compile-flags: -Cinstrument-coverage=no -// [off] compile-flags: -Cinstrument-coverage=off -// [false] compile-flags: -Cinstrument-coverage=false -// [zero] compile-flags: -Cinstrument-coverage=0 +//@ needs-profiler-support +//@ revisions: n no off false zero +//@ [n] compile-flags: -Cinstrument-coverage=n +//@ [no] compile-flags: -Cinstrument-coverage=no +//@ [off] compile-flags: -Cinstrument-coverage=off +//@ [false] compile-flags: -Cinstrument-coverage=false +//@ [zero] compile-flags: -Cinstrument-coverage=0 // CHECK-NOT: __llvm_profile_filename // CHECK-NOT: __llvm_coverage_mapping diff --git a/tests/codegen/instrument-coverage.rs b/tests/codegen/instrument-coverage.rs index f8437dac4632..f7d96ea34672 100644 --- a/tests/codegen/instrument-coverage.rs +++ b/tests/codegen/instrument-coverage.rs @@ -1,13 +1,13 @@ // Test that `-Cinstrument-coverage` creates expected __llvm_profile_filename symbol in LLVM IR. -// needs-profiler-support -// revisions: default y yes on true all -// [default] compile-flags: -Cinstrument-coverage -// [y] compile-flags: -Cinstrument-coverage=y -// [yes] compile-flags: -Cinstrument-coverage=yes -// [on] compile-flags: -Cinstrument-coverage=on -// [true] compile-flags: -Cinstrument-coverage=true -// [all] compile-flags: -Cinstrument-coverage=all +//@ needs-profiler-support +//@ revisions: default y yes on true all +//@ [default] compile-flags: -Cinstrument-coverage +//@ [y] compile-flags: -Cinstrument-coverage=y +//@ [yes] compile-flags: -Cinstrument-coverage=yes +//@ [on] compile-flags: -Cinstrument-coverage=on +//@ [true] compile-flags: -Cinstrument-coverage=true +//@ [all] compile-flags: -Cinstrument-coverage=all // CHECK: @__llvm_profile_filename = {{.*}}"default_%m_%p.profraw\00"{{.*}} // CHECK: @__llvm_coverage_mapping diff --git a/tests/codegen/instrument-mcount.rs b/tests/codegen/instrument-mcount.rs index 50823775a41a..8c97535d4a82 100644 --- a/tests/codegen/instrument-mcount.rs +++ b/tests/codegen/instrument-mcount.rs @@ -1,5 +1,5 @@ // -// compile-flags: -Z instrument-mcount -Copt-level=0 +//@ compile-flags: -Z instrument-mcount -Copt-level=0 #![crate_type = "lib"] diff --git a/tests/codegen/instrument-xray/basic.rs b/tests/codegen/instrument-xray/basic.rs index 5da878474f2e..7aaebf41e36e 100644 --- a/tests/codegen/instrument-xray/basic.rs +++ b/tests/codegen/instrument-xray/basic.rs @@ -1,7 +1,7 @@ // Checks that `-Z instrument-xray` produces expected instrumentation. // -// needs-xray -// compile-flags: -Z instrument-xray=always -Copt-level=0 +//@ needs-xray +//@ compile-flags: -Z instrument-xray=always -Copt-level=0 #![crate_type = "lib"] diff --git a/tests/codegen/instrument-xray/options-combine.rs b/tests/codegen/instrument-xray/options-combine.rs index d1e56586279a..d1e3b78e6b24 100644 --- a/tests/codegen/instrument-xray/options-combine.rs +++ b/tests/codegen/instrument-xray/options-combine.rs @@ -1,9 +1,9 @@ // Checks that `-Z instrument-xray` options can be specified multiple times. // -// needs-xray -// compile-flags: -Z instrument-xray=skip-exit -Copt-level=0 -// compile-flags: -Z instrument-xray=instruction-threshold=123 -Copt-level=0 -// compile-flags: -Z instrument-xray=instruction-threshold=456 -Copt-level=0 +//@ needs-xray +//@ compile-flags: -Z instrument-xray=skip-exit -Copt-level=0 +//@ compile-flags: -Z instrument-xray=instruction-threshold=123 -Copt-level=0 +//@ compile-flags: -Z instrument-xray=instruction-threshold=456 -Copt-level=0 #![crate_type = "lib"] diff --git a/tests/codegen/instrument-xray/options-override.rs b/tests/codegen/instrument-xray/options-override.rs index b1fc4c966dcb..428fb723edb1 100644 --- a/tests/codegen/instrument-xray/options-override.rs +++ b/tests/codegen/instrument-xray/options-override.rs @@ -1,8 +1,8 @@ // Checks that the last `-Z instrument-xray` option wins. // -// needs-xray -// compile-flags: -Z instrument-xray=always -Copt-level=0 -// compile-flags: -Z instrument-xray=never -Copt-level=0 +//@ needs-xray +//@ compile-flags: -Z instrument-xray=always -Copt-level=0 +//@ compile-flags: -Z instrument-xray=never -Copt-level=0 #![crate_type = "lib"] diff --git a/tests/codegen/integer-cmp.rs b/tests/codegen/integer-cmp.rs index 8ada3cf09d07..46972878da50 100644 --- a/tests/codegen/integer-cmp.rs +++ b/tests/codegen/integer-cmp.rs @@ -1,7 +1,7 @@ // This is test for more optimal Ord implementation for integers. // See for more info. -// compile-flags: -C opt-level=3 +//@ compile-flags: -C opt-level=3 #![crate_type = "lib"] diff --git a/tests/codegen/integer-overflow.rs b/tests/codegen/integer-overflow.rs index b5c351b5e35d..00780251bbc1 100644 --- a/tests/codegen/integer-overflow.rs +++ b/tests/codegen/integer-overflow.rs @@ -1,4 +1,4 @@ -// compile-flags: -O -C overflow-checks=on +//@ compile-flags: -O -C overflow-checks=on #![crate_type = "lib"] diff --git a/tests/codegen/internalize-closures.rs b/tests/codegen/internalize-closures.rs index ab3dc3fba5ef..d37aa5fee8da 100644 --- a/tests/codegen/internalize-closures.rs +++ b/tests/codegen/internalize-closures.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes -Zmir-opt-level=0 +//@ compile-flags: -C no-prepopulate-passes -Zmir-opt-level=0 pub fn main() { diff --git a/tests/codegen/intrinsic-no-unnamed-attr.rs b/tests/codegen/intrinsic-no-unnamed-attr.rs index c8a8e0b3e7a0..45d06c70a6d7 100644 --- a/tests/codegen/intrinsic-no-unnamed-attr.rs +++ b/tests/codegen/intrinsic-no-unnamed-attr.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes +//@ compile-flags: -C no-prepopulate-passes #![feature(intrinsics)] diff --git a/tests/codegen/intrinsics/compare_bytes.rs b/tests/codegen/intrinsics/compare_bytes.rs index e69224d818c0..cd592918fb0c 100644 --- a/tests/codegen/intrinsics/compare_bytes.rs +++ b/tests/codegen/intrinsics/compare_bytes.rs @@ -1,7 +1,7 @@ -// revisions: INT32 INT16 -// compile-flags: -O -// [INT32] ignore-16bit -// [INT16] only-16bit +//@ revisions: INT32 INT16 +//@ compile-flags: -O +//@ [INT32] ignore-16bit +//@ [INT16] only-16bit #![crate_type = "lib"] #![feature(core_intrinsics)] diff --git a/tests/codegen/intrinsics/const_eval_select.rs b/tests/codegen/intrinsics/const_eval_select.rs index f3877dc6b96a..c8debe8d7113 100644 --- a/tests/codegen/intrinsics/const_eval_select.rs +++ b/tests/codegen/intrinsics/const_eval_select.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes -Copt-level=0 +//@ compile-flags: -C no-prepopulate-passes -Copt-level=0 #![crate_type = "lib"] #![feature(const_eval_select)] diff --git a/tests/codegen/intrinsics/exact_div.rs b/tests/codegen/intrinsics/exact_div.rs index 68eaa39997a1..dc625ba7fe4e 100644 --- a/tests/codegen/intrinsics/exact_div.rs +++ b/tests/codegen/intrinsics/exact_div.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes +//@ compile-flags: -C no-prepopulate-passes #![crate_type = "lib"] #![feature(core_intrinsics)] diff --git a/tests/codegen/intrinsics/likely.rs b/tests/codegen/intrinsics/likely.rs index c5a0185bd482..c5904085fc08 100644 --- a/tests/codegen/intrinsics/likely.rs +++ b/tests/codegen/intrinsics/likely.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes +//@ compile-flags: -C no-prepopulate-passes #![crate_type = "lib"] #![feature(core_intrinsics)] diff --git a/tests/codegen/intrinsics/mask.rs b/tests/codegen/intrinsics/mask.rs index 82131c558472..5344274678cc 100644 --- a/tests/codegen/intrinsics/mask.rs +++ b/tests/codegen/intrinsics/mask.rs @@ -1,4 +1,4 @@ -// compile-flags: -Copt-level=0 +//@ compile-flags: -Copt-level=0 #![crate_type = "lib"] #![feature(core_intrinsics)] diff --git a/tests/codegen/intrinsics/nontemporal.rs b/tests/codegen/intrinsics/nontemporal.rs index dc020c121195..076d6d6d9da4 100644 --- a/tests/codegen/intrinsics/nontemporal.rs +++ b/tests/codegen/intrinsics/nontemporal.rs @@ -1,4 +1,4 @@ -// compile-flags: -O +//@ compile-flags: -O #![feature(core_intrinsics)] #![crate_type = "lib"] diff --git a/tests/codegen/intrinsics/offset.rs b/tests/codegen/intrinsics/offset.rs index 542bacf99a80..d4791cd30b0b 100644 --- a/tests/codegen/intrinsics/offset.rs +++ b/tests/codegen/intrinsics/offset.rs @@ -1,4 +1,4 @@ -// compile-flags: -O -C no-prepopulate-passes +//@ compile-flags: -O -C no-prepopulate-passes #![crate_type = "lib"] #![feature(core_intrinsics)] diff --git a/tests/codegen/intrinsics/offset_from.rs b/tests/codegen/intrinsics/offset_from.rs index d0de4c8355d0..ef1a77ef184c 100644 --- a/tests/codegen/intrinsics/offset_from.rs +++ b/tests/codegen/intrinsics/offset_from.rs @@ -1,5 +1,5 @@ -// compile-flags: -C opt-level=1 -// only-64bit (because we're using [ui]size) +//@ compile-flags: -C opt-level=1 +//@ only-64bit (because we're using [ui]size) #![crate_type = "lib"] #![feature(core_intrinsics)] diff --git a/tests/codegen/intrinsics/prefetch.rs b/tests/codegen/intrinsics/prefetch.rs index 59d7fa6381b8..edd8c20b38f1 100644 --- a/tests/codegen/intrinsics/prefetch.rs +++ b/tests/codegen/intrinsics/prefetch.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes +//@ compile-flags: -C no-prepopulate-passes #![crate_type = "lib"] #![feature(core_intrinsics)] diff --git a/tests/codegen/intrinsics/transmute-niched.rs b/tests/codegen/intrinsics/transmute-niched.rs index e9c8d803cb9e..7c448c82e4b2 100644 --- a/tests/codegen/intrinsics/transmute-niched.rs +++ b/tests/codegen/intrinsics/transmute-niched.rs @@ -1,7 +1,7 @@ -// revisions: OPT DBG -// [OPT] compile-flags: -C opt-level=3 -C no-prepopulate-passes -// [DBG] compile-flags: -C opt-level=0 -C no-prepopulate-passes -// only-64bit (so I don't need to worry about usize) +//@ revisions: OPT DBG +//@ [OPT] compile-flags: -C opt-level=3 -C no-prepopulate-passes +//@ [DBG] compile-flags: -C opt-level=0 -C no-prepopulate-passes +//@ only-64bit (so I don't need to worry about usize) #![crate_type = "lib"] diff --git a/tests/codegen/intrinsics/transmute-x64.rs b/tests/codegen/intrinsics/transmute-x64.rs index 19020f6280a5..ea1c6b0e7e80 100644 --- a/tests/codegen/intrinsics/transmute-x64.rs +++ b/tests/codegen/intrinsics/transmute-x64.rs @@ -1,5 +1,5 @@ -// compile-flags: -O -C no-prepopulate-passes -// only-x86_64 (it's using arch-specific types) +//@ compile-flags: -O -C no-prepopulate-passes +//@ only-x86_64 (it's using arch-specific types) #![crate_type = "lib"] diff --git a/tests/codegen/intrinsics/transmute.rs b/tests/codegen/intrinsics/transmute.rs index eff16050875c..5a503e86010b 100644 --- a/tests/codegen/intrinsics/transmute.rs +++ b/tests/codegen/intrinsics/transmute.rs @@ -1,5 +1,5 @@ -// compile-flags: -O -C no-prepopulate-passes -// only-64bit (so I don't need to worry about usize) +//@ compile-flags: -O -C no-prepopulate-passes +//@ only-64bit (so I don't need to worry about usize) #![crate_type = "lib"] #![feature(core_intrinsics)] diff --git a/tests/codegen/intrinsics/volatile.rs b/tests/codegen/intrinsics/volatile.rs index 7980c00e7e72..2dea5ecb2ca9 100644 --- a/tests/codegen/intrinsics/volatile.rs +++ b/tests/codegen/intrinsics/volatile.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes +//@ compile-flags: -C no-prepopulate-passes #![crate_type = "lib"] #![feature(core_intrinsics)] diff --git a/tests/codegen/is_val_statically_known.rs b/tests/codegen/is_val_statically_known.rs index 95f6466b2548..255d8950a974 100644 --- a/tests/codegen/is_val_statically_known.rs +++ b/tests/codegen/is_val_statically_known.rs @@ -1,4 +1,4 @@ -// compile-flags: --crate-type=lib -Zmerge-functions=disabled -O +//@ compile-flags: --crate-type=lib -Zmerge-functions=disabled -O #![feature(core_intrinsics)] diff --git a/tests/codegen/issue-97217.rs b/tests/codegen/issue-97217.rs index af7345442fc5..93dd1228ce12 100644 --- a/tests/codegen/issue-97217.rs +++ b/tests/codegen/issue-97217.rs @@ -1,6 +1,6 @@ -// compile-flags: -C opt-level=3 -// ignore-debug: the debug assertions get in the way -// min-llvm-version: 17.0.2 +//@ compile-flags: -C opt-level=3 +//@ ignore-debug: the debug assertions get in the way +//@ min-llvm-version: 17.0.2 #![crate_type = "lib"] // Regression test for issue 97217 (the following should result in no allocations) diff --git a/tests/codegen/issues/issue-101048.rs b/tests/codegen/issues/issue-101048.rs index e4712cf9cb3f..fa6dc550f301 100644 --- a/tests/codegen/issues/issue-101048.rs +++ b/tests/codegen/issues/issue-101048.rs @@ -1,4 +1,4 @@ -// compile-flags: -O +//@ compile-flags: -O #![crate_type = "lib"] diff --git a/tests/codegen/issues/issue-101082.rs b/tests/codegen/issues/issue-101082.rs index 58fcd75a8f2d..7c96f9a34f8c 100644 --- a/tests/codegen/issues/issue-101082.rs +++ b/tests/codegen/issues/issue-101082.rs @@ -1,5 +1,5 @@ -// compile-flags: -O -// ignore-debug: the debug assertions get in the way +//@ compile-flags: -O +//@ ignore-debug: the debug assertions get in the way #![crate_type = "lib"] diff --git a/tests/codegen/issues/issue-101814.rs b/tests/codegen/issues/issue-101814.rs index 63a8cebcb608..6175d80c9cde 100644 --- a/tests/codegen/issues/issue-101814.rs +++ b/tests/codegen/issues/issue-101814.rs @@ -1,5 +1,5 @@ -// compile-flags: -O -// ignore-debug: the debug assertions get in the way +//@ compile-flags: -O +//@ ignore-debug: the debug assertions get in the way #![crate_type = "lib"] diff --git a/tests/codegen/issues/issue-103132.rs b/tests/codegen/issues/issue-103132.rs index 521d424c2696..8c1a17c8b78c 100644 --- a/tests/codegen/issues/issue-103132.rs +++ b/tests/codegen/issues/issue-103132.rs @@ -1,4 +1,4 @@ -// compile-flags: -O -C overflow-checks +//@ compile-flags: -O -C overflow-checks #![crate_type = "lib"] diff --git a/tests/codegen/issues/issue-103285-ptr-addr-overflow-check.rs b/tests/codegen/issues/issue-103285-ptr-addr-overflow-check.rs index a3499babea21..d4a74b3d7828 100644 --- a/tests/codegen/issues/issue-103285-ptr-addr-overflow-check.rs +++ b/tests/codegen/issues/issue-103285-ptr-addr-overflow-check.rs @@ -1,4 +1,4 @@ -// compile-flags: -O -C debug-assertions=yes +//@ compile-flags: -O -C debug-assertions=yes #![crate_type = "lib"] #![feature(strict_provenance)] diff --git a/tests/codegen/issues/issue-103327.rs b/tests/codegen/issues/issue-103327.rs index 021f1ca0c3af..398b1f376b78 100644 --- a/tests/codegen/issues/issue-103327.rs +++ b/tests/codegen/issues/issue-103327.rs @@ -1,4 +1,4 @@ -// compile-flags: -O +//@ compile-flags: -O #![crate_type = "lib"] diff --git a/tests/codegen/issues/issue-103840.rs b/tests/codegen/issues/issue-103840.rs index f19d7031bb38..14f157771e07 100644 --- a/tests/codegen/issues/issue-103840.rs +++ b/tests/codegen/issues/issue-103840.rs @@ -1,4 +1,4 @@ -// compile-flags: -O +//@ compile-flags: -O #![crate_type = "lib"] pub fn foo(t: &mut Vec) { diff --git a/tests/codegen/issues/issue-105386-ub-in-debuginfo.rs b/tests/codegen/issues/issue-105386-ub-in-debuginfo.rs index 54c50f840c55..476db7c13585 100644 --- a/tests/codegen/issues/issue-105386-ub-in-debuginfo.rs +++ b/tests/codegen/issues/issue-105386-ub-in-debuginfo.rs @@ -1,4 +1,4 @@ -// compile-flags: --crate-type=lib -O -Cdebuginfo=2 -Cno-prepopulate-passes -Zmir-enable-passes=-ScalarReplacementOfAggregates +//@ compile-flags: --crate-type=lib -O -Cdebuginfo=2 -Cno-prepopulate-passes -Zmir-enable-passes=-ScalarReplacementOfAggregates // MIR SROA will decompose the closure #![feature(stmt_expr_attributes)] diff --git a/tests/codegen/issues/issue-106369.rs b/tests/codegen/issues/issue-106369.rs index 3fe7be4f1442..5120c5f4e490 100644 --- a/tests/codegen/issues/issue-106369.rs +++ b/tests/codegen/issues/issue-106369.rs @@ -1,5 +1,5 @@ -// compile-flags: -O -// ignore-debug (the extra assertions get in the way) +//@ compile-flags: -O +//@ ignore-debug (the extra assertions get in the way) #![crate_type = "lib"] diff --git a/tests/codegen/issues/issue-111603.rs b/tests/codegen/issues/issue-111603.rs index 06429ed3fa9b..3f4c7e7d5423 100644 --- a/tests/codegen/issues/issue-111603.rs +++ b/tests/codegen/issues/issue-111603.rs @@ -1,4 +1,4 @@ -// compile-flags: -O +//@ compile-flags: -O #![crate_type = "lib"] #![feature(get_mut_unchecked, new_uninit)] diff --git a/tests/codegen/issues/issue-114312.rs b/tests/codegen/issues/issue-114312.rs index e2fbcef721ef..54fa40dcf0d4 100644 --- a/tests/codegen/issues/issue-114312.rs +++ b/tests/codegen/issues/issue-114312.rs @@ -1,6 +1,6 @@ -// compile-flags: -O -// min-llvm-version: 17 -// only-x86_64-unknown-linux-gnu +//@ compile-flags: -O +//@ min-llvm-version: 17 +//@ only-x86_64-unknown-linux-gnu // We want to check that this function does not mis-optimize to loop jumping. diff --git a/tests/codegen/issues/issue-115385-llvm-jump-threading.rs b/tests/codegen/issues/issue-115385-llvm-jump-threading.rs index 142e3596d961..55aa69a7de03 100644 --- a/tests/codegen/issues/issue-115385-llvm-jump-threading.rs +++ b/tests/codegen/issues/issue-115385-llvm-jump-threading.rs @@ -1,4 +1,4 @@ -// compile-flags: -O -Ccodegen-units=1 +//@ compile-flags: -O -Ccodegen-units=1 #![crate_type = "lib"] diff --git a/tests/codegen/issues/issue-116878.rs b/tests/codegen/issues/issue-116878.rs index 5864f5323249..2c561d7be799 100644 --- a/tests/codegen/issues/issue-116878.rs +++ b/tests/codegen/issues/issue-116878.rs @@ -1,5 +1,5 @@ -// compile-flags: -O -// ignore-debug: the debug assertions get in the way +//@ compile-flags: -O +//@ ignore-debug: the debug assertions get in the way #![crate_type = "lib"] /// Make sure no bounds checks are emitted after a `get_unchecked`. diff --git a/tests/codegen/issues/issue-119422.rs b/tests/codegen/issues/issue-119422.rs index 9c99d96317d7..937fdcf28f5d 100644 --- a/tests/codegen/issues/issue-119422.rs +++ b/tests/codegen/issues/issue-119422.rs @@ -1,8 +1,8 @@ //! This test checks that compiler don't generate useless compares to zeros //! for NonZero integer types. -// compile-flags: -O --edition=2021 -Zmerge-functions=disabled -// only-64bit (because the LLVM type of i64 for usize shows up) +//@ compile-flags: -O --edition=2021 -Zmerge-functions=disabled +//@ only-64bit (because the LLVM type of i64 for usize shows up) #![crate_type = "lib"] diff --git a/tests/codegen/issues/issue-13018.rs b/tests/codegen/issues/issue-13018.rs index b70ea1f48c8c..d0a8ce159118 100644 --- a/tests/codegen/issues/issue-13018.rs +++ b/tests/codegen/issues/issue-13018.rs @@ -1,4 +1,4 @@ -// compile-flags: -O +//@ compile-flags: -O // A drop([...].clone()) sequence on an Rc should be a no-op // In particular, no call to __rust_dealloc should be emitted diff --git a/tests/codegen/issues/issue-27130.rs b/tests/codegen/issues/issue-27130.rs index e5ee94e1f45e..9c22b41e97fe 100644 --- a/tests/codegen/issues/issue-27130.rs +++ b/tests/codegen/issues/issue-27130.rs @@ -1,4 +1,4 @@ -// compile-flags: -O +//@ compile-flags: -O #![crate_type = "lib"] diff --git a/tests/codegen/issues/issue-32031.rs b/tests/codegen/issues/issue-32031.rs index abef92c19b61..9693c414a67d 100644 --- a/tests/codegen/issues/issue-32031.rs +++ b/tests/codegen/issues/issue-32031.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes -Copt-level=0 +//@ compile-flags: -C no-prepopulate-passes -Copt-level=0 #![crate_type = "lib"] diff --git a/tests/codegen/issues/issue-32364.rs b/tests/codegen/issues/issue-32364.rs index 85493a4bb739..50006e3f2181 100644 --- a/tests/codegen/issues/issue-32364.rs +++ b/tests/codegen/issues/issue-32364.rs @@ -1,8 +1,8 @@ // Test that `extern "stdcall"` is properly translated. -// only-x86 +//@ only-x86 -// compile-flags: -C no-prepopulate-passes +//@ compile-flags: -C no-prepopulate-passes struct Foo; diff --git a/tests/codegen/issues/issue-34634.rs b/tests/codegen/issues/issue-34634.rs index f53fa240cd1a..a11f248e7404 100644 --- a/tests/codegen/issues/issue-34634.rs +++ b/tests/codegen/issues/issue-34634.rs @@ -3,7 +3,7 @@ // switch case (the second check present until rustc 1.12). // This test also verifies that a single panic call is generated (for the division by zero case). -// compile-flags: -O +//@ compile-flags: -O #![crate_type = "lib"] // CHECK-LABEL: @f diff --git a/tests/codegen/issues/issue-34947-pow-i32.rs b/tests/codegen/issues/issue-34947-pow-i32.rs index 653da8e8b5f7..c9141c0e9252 100644 --- a/tests/codegen/issues/issue-34947-pow-i32.rs +++ b/tests/codegen/issues/issue-34947-pow-i32.rs @@ -1,4 +1,4 @@ -// compile-flags: -O +//@ compile-flags: -O #![crate_type = "lib"] diff --git a/tests/codegen/issues/issue-37945.rs b/tests/codegen/issues/issue-37945.rs index 329769940f9d..3f750157a818 100644 --- a/tests/codegen/issues/issue-37945.rs +++ b/tests/codegen/issues/issue-37945.rs @@ -1,6 +1,6 @@ -// compile-flags: -O -Zmerge-functions=disabled -// ignore-32bit LLVM has a bug with them -// ignore-debug +//@ compile-flags: -O -Zmerge-functions=disabled +//@ ignore-32bit LLVM has a bug with them +//@ ignore-debug // Check that LLVM understands that `Iter` pointer is not null. Issue #37945. diff --git a/tests/codegen/issues/issue-44056-macos-tls-align.rs b/tests/codegen/issues/issue-44056-macos-tls-align.rs index 44aa9766d3c0..c99f0b73038b 100644 --- a/tests/codegen/issues/issue-44056-macos-tls-align.rs +++ b/tests/codegen/issues/issue-44056-macos-tls-align.rs @@ -1,6 +1,6 @@ // -// only-macos -// compile-flags: -O +//@ only-macos +//@ compile-flags: -O #![crate_type = "rlib"] #![feature(thread_local)] diff --git a/tests/codegen/issues/issue-45222.rs b/tests/codegen/issues/issue-45222.rs index e9b05e648b44..8fa9d87f4970 100644 --- a/tests/codegen/issues/issue-45222.rs +++ b/tests/codegen/issues/issue-45222.rs @@ -1,5 +1,5 @@ -// compile-flags: -O -// ignore-debug: the debug assertions get in the way +//@ compile-flags: -O +//@ ignore-debug: the debug assertions get in the way #![crate_type = "lib"] diff --git a/tests/codegen/issues/issue-45466.rs b/tests/codegen/issues/issue-45466.rs index c79542767774..165bc3ca4112 100644 --- a/tests/codegen/issues/issue-45466.rs +++ b/tests/codegen/issues/issue-45466.rs @@ -1,5 +1,5 @@ -// compile-flags: -O -// ignore-debug: the debug assertions get in the way +//@ compile-flags: -O +//@ ignore-debug: the debug assertions get in the way #![crate_type="rlib"] diff --git a/tests/codegen/issues/issue-45964-bounds-check-slice-pos.rs b/tests/codegen/issues/issue-45964-bounds-check-slice-pos.rs index 1daa213fc821..c9bc7fc316e9 100644 --- a/tests/codegen/issues/issue-45964-bounds-check-slice-pos.rs +++ b/tests/codegen/issues/issue-45964-bounds-check-slice-pos.rs @@ -1,8 +1,8 @@ // This test case checks that slice::{r}position functions do not // prevent optimizing away bounds checks -// compile-flags: -O -// ignore-debug: the debug assertions get in the way +//@ compile-flags: -O +//@ ignore-debug: the debug assertions get in the way #![crate_type="rlib"] diff --git a/tests/codegen/issues/issue-56267-2.rs b/tests/codegen/issues/issue-56267-2.rs index 1715e9f05ab5..ced0d2d63bb5 100644 --- a/tests/codegen/issues/issue-56267-2.rs +++ b/tests/codegen/issues/issue-56267-2.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes +//@ compile-flags: -C no-prepopulate-passes #![crate_type="rlib"] diff --git a/tests/codegen/issues/issue-56267.rs b/tests/codegen/issues/issue-56267.rs index 90aa9f7ae899..fc3754f2d990 100644 --- a/tests/codegen/issues/issue-56267.rs +++ b/tests/codegen/issues/issue-56267.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes +//@ compile-flags: -C no-prepopulate-passes #![crate_type="rlib"] diff --git a/tests/codegen/issues/issue-56927.rs b/tests/codegen/issues/issue-56927.rs index 1b09ce565b37..e4a0a1791418 100644 --- a/tests/codegen/issues/issue-56927.rs +++ b/tests/codegen/issues/issue-56927.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes +//@ compile-flags: -C no-prepopulate-passes #![crate_type="rlib"] diff --git a/tests/codegen/issues/issue-58881.rs b/tests/codegen/issues/issue-58881.rs index a1d0e8eb7e0c..759e3b70baa1 100644 --- a/tests/codegen/issues/issue-58881.rs +++ b/tests/codegen/issues/issue-58881.rs @@ -1,7 +1,7 @@ -// compile-flags: -C no-prepopulate-passes -Copt-level=0 +//@ compile-flags: -C no-prepopulate-passes -Copt-level=0 // -// only-x86_64 -// ignore-windows +//@ only-x86_64 +//@ ignore-windows #![crate_type = "lib"] diff --git a/tests/codegen/issues/issue-59352.rs b/tests/codegen/issues/issue-59352.rs index d271fe027e30..7bedc3ffc4a1 100644 --- a/tests/codegen/issues/issue-59352.rs +++ b/tests/codegen/issues/issue-59352.rs @@ -6,7 +6,7 @@ // test case should be removed as it will become redundant. // mir-opt-level=3 enables inlining and enables LLVM to optimize away the unreachable panic call. -// compile-flags: -O -Z mir-opt-level=3 +//@ compile-flags: -O -Z mir-opt-level=3 #![crate_type = "rlib"] diff --git a/tests/codegen/issues/issue-69101-bounds-check.rs b/tests/codegen/issues/issue-69101-bounds-check.rs index 655de45fd51e..f96a8e9da4b4 100644 --- a/tests/codegen/issues/issue-69101-bounds-check.rs +++ b/tests/codegen/issues/issue-69101-bounds-check.rs @@ -1,5 +1,5 @@ -// compile-flags: -O -// ignore-debug: the debug assertions get in the way +//@ compile-flags: -O +//@ ignore-debug: the debug assertions get in the way #![crate_type = "lib"] // Make sure no bounds checks are emitted in the loop when upfront slicing diff --git a/tests/codegen/issues/issue-73031.rs b/tests/codegen/issues/issue-73031.rs index a09c4bcfbeac..61a269999e90 100644 --- a/tests/codegen/issues/issue-73031.rs +++ b/tests/codegen/issues/issue-73031.rs @@ -1,4 +1,4 @@ -// compile-flags: -O +//@ compile-flags: -O #![crate_type = "lib"] // Test that LLVM can eliminate the unreachable `All::None` branch. diff --git a/tests/codegen/issues/issue-73258.rs b/tests/codegen/issues/issue-73258.rs index 0134f929b296..bc71e15a41fe 100644 --- a/tests/codegen/issues/issue-73258.rs +++ b/tests/codegen/issues/issue-73258.rs @@ -1,5 +1,5 @@ -// compile-flags: -O -// ignore-debug (the extra assertions get in the way) +//@ compile-flags: -O +//@ ignore-debug (the extra assertions get in the way) #![crate_type = "lib"] diff --git a/tests/codegen/issues/issue-73338-effecient-cmp.rs b/tests/codegen/issues/issue-73338-effecient-cmp.rs index 85c2bbfd040b..a64eb56f9030 100644 --- a/tests/codegen/issues/issue-73338-effecient-cmp.rs +++ b/tests/codegen/issues/issue-73338-effecient-cmp.rs @@ -2,7 +2,7 @@ // generated by #[derive(PartialOrd)] // doesn't contain jumps for C enums -// compile-flags: -Copt-level=3 +//@ compile-flags: -Copt-level=3 #![crate_type="lib"] diff --git a/tests/codegen/issues/issue-73396-bounds-check-after-position.rs b/tests/codegen/issues/issue-73396-bounds-check-after-position.rs index 2d7797887912..db91a85474d2 100644 --- a/tests/codegen/issues/issue-73396-bounds-check-after-position.rs +++ b/tests/codegen/issues/issue-73396-bounds-check-after-position.rs @@ -1,5 +1,5 @@ -// compile-flags: -O -// ignore-debug: the debug assertions get in the way +//@ compile-flags: -O +//@ ignore-debug: the debug assertions get in the way #![crate_type = "lib"] // Make sure no bounds checks are emitted when slicing or indexing diff --git a/tests/codegen/issues/issue-73827-bounds-check-index-in-subexpr.rs b/tests/codegen/issues/issue-73827-bounds-check-index-in-subexpr.rs index 1ad05906e21a..c3eb1a5968af 100644 --- a/tests/codegen/issues/issue-73827-bounds-check-index-in-subexpr.rs +++ b/tests/codegen/issues/issue-73827-bounds-check-index-in-subexpr.rs @@ -1,7 +1,7 @@ // This test checks that bounds checks are elided when // index is part of a (x | y) < C style condition -// compile-flags: -O +//@ compile-flags: -O #![crate_type = "lib"] diff --git a/tests/codegen/issues/issue-75525-bounds-checks.rs b/tests/codegen/issues/issue-75525-bounds-checks.rs index 2d363d8f73be..fbc10ce3d843 100644 --- a/tests/codegen/issues/issue-75525-bounds-checks.rs +++ b/tests/codegen/issues/issue-75525-bounds-checks.rs @@ -1,6 +1,6 @@ // Regression test for #75525, verifies that no bounds checks are generated. -// compile-flags: -O +//@ compile-flags: -O #![crate_type = "lib"] diff --git a/tests/codegen/issues/issue-75546.rs b/tests/codegen/issues/issue-75546.rs index 470a9e040960..992ef97d6242 100644 --- a/tests/codegen/issues/issue-75546.rs +++ b/tests/codegen/issues/issue-75546.rs @@ -1,4 +1,4 @@ -// compile-flags: -O +//@ compile-flags: -O #![crate_type = "lib"] // Test that LLVM can eliminate the impossible `i == 0` check. diff --git a/tests/codegen/issues/issue-75659.rs b/tests/codegen/issues/issue-75659.rs index 9394868c08db..1860b73f2a9a 100644 --- a/tests/codegen/issues/issue-75659.rs +++ b/tests/codegen/issues/issue-75659.rs @@ -1,8 +1,8 @@ // This test checks that the call to memchr/slice_contains is optimized away // when searching in small slices. -// compile-flags: -O -Zinline-mir=false -// only-x86_64 +//@ compile-flags: -O -Zinline-mir=false +//@ only-x86_64 #![crate_type = "lib"] diff --git a/tests/codegen/issues/issue-75978.rs b/tests/codegen/issues/issue-75978.rs index abfafc35f0b4..ed953fae7671 100644 --- a/tests/codegen/issues/issue-75978.rs +++ b/tests/codegen/issues/issue-75978.rs @@ -1,4 +1,4 @@ -// compile-flags: -O +//@ compile-flags: -O #![crate_type = "lib"] diff --git a/tests/codegen/issues/issue-77812.rs b/tests/codegen/issues/issue-77812.rs index 4cc82414546b..b9ce0a4f7db2 100644 --- a/tests/codegen/issues/issue-77812.rs +++ b/tests/codegen/issues/issue-77812.rs @@ -1,4 +1,4 @@ -// compile-flags: -O +//@ compile-flags: -O #![crate_type = "lib"] // Test that LLVM can eliminate the unreachable `Variant::Zero` branch. diff --git a/tests/codegen/issues/issue-81408-dllimport-thinlto-windows.rs b/tests/codegen/issues/issue-81408-dllimport-thinlto-windows.rs index 0b6ab4f7ecb3..49301be776fd 100644 --- a/tests/codegen/issues/issue-81408-dllimport-thinlto-windows.rs +++ b/tests/codegen/issues/issue-81408-dllimport-thinlto-windows.rs @@ -1,6 +1,6 @@ -// compile-flags: -O -C lto=thin -C prefer-dynamic=no -// only-windows -// aux-build:static_dllimport_aux.rs +//@ compile-flags: -O -C lto=thin -C prefer-dynamic=no +//@ only-windows +//@ aux-build:static_dllimport_aux.rs // Test that on Windows, when performing ThinLTO, we do not mark cross-crate static items with // dllimport because lld does not fix the symbol names for us. diff --git a/tests/codegen/issues/issue-84268.rs b/tests/codegen/issues/issue-84268.rs index 7ca195447007..379ee4f13f64 100644 --- a/tests/codegen/issues/issue-84268.rs +++ b/tests/codegen/issues/issue-84268.rs @@ -1,4 +1,4 @@ -// compile-flags: -O --crate-type=rlib +//@ compile-flags: -O --crate-type=rlib #![feature(platform_intrinsics, repr_simd)] extern "platform-intrinsic" { diff --git a/tests/codegen/issues/issue-85872-multiple-reverse.rs b/tests/codegen/issues/issue-85872-multiple-reverse.rs index a4723a0e9460..fb5ff8309e5c 100644 --- a/tests/codegen/issues/issue-85872-multiple-reverse.rs +++ b/tests/codegen/issues/issue-85872-multiple-reverse.rs @@ -1,4 +1,4 @@ -// compile-flags: -O +//@ compile-flags: -O #![crate_type = "lib"] diff --git a/tests/codegen/issues/issue-86106.rs b/tests/codegen/issues/issue-86106.rs index 5f71d46fb202..e8164c5c3802 100644 --- a/tests/codegen/issues/issue-86106.rs +++ b/tests/codegen/issues/issue-86106.rs @@ -1,5 +1,5 @@ -// only-64bit llvm appears to use stores instead of memset on 32bit -// compile-flags: -C opt-level=3 -Z merge-functions=disabled +//@ only-64bit llvm appears to use stores instead of memset on 32bit +//@ compile-flags: -C opt-level=3 -Z merge-functions=disabled // The below two functions ensure that both `String::new()` and `"".to_string()` // produce the identical code. diff --git a/tests/codegen/issues/issue-96274.rs b/tests/codegen/issues/issue-96274.rs index a44789ce350a..d278796dd02a 100644 --- a/tests/codegen/issues/issue-96274.rs +++ b/tests/codegen/issues/issue-96274.rs @@ -1,4 +1,4 @@ -// compile-flags: -O +//@ compile-flags: -O #![crate_type = "lib"] #![feature(inline_const)] diff --git a/tests/codegen/issues/issue-96497-slice-size-nowrap.rs b/tests/codegen/issues/issue-96497-slice-size-nowrap.rs index 3ea6a5405e51..c2b262b3334c 100644 --- a/tests/codegen/issues/issue-96497-slice-size-nowrap.rs +++ b/tests/codegen/issues/issue-96497-slice-size-nowrap.rs @@ -2,7 +2,7 @@ // The possibility of wrapping results in an additional branch when dropping boxed slices // in some situations, see https://github.com/rust-lang/rust/issues/96497#issuecomment-1112865218 -// compile-flags: -O +//@ compile-flags: -O #![crate_type="lib"] diff --git a/tests/codegen/issues/issue-98156-const-arg-temp-lifetime.rs b/tests/codegen/issues/issue-98156-const-arg-temp-lifetime.rs index 12ace5fff6b6..28324bfa90ef 100644 --- a/tests/codegen/issues/issue-98156-const-arg-temp-lifetime.rs +++ b/tests/codegen/issues/issue-98156-const-arg-temp-lifetime.rs @@ -1,6 +1,6 @@ // This test checks that temporaries for indirectly-passed arguments get lifetime markers. -// compile-flags: -O -C no-prepopulate-passes -Zmir-opt-level=0 +//@ compile-flags: -O -C no-prepopulate-passes -Zmir-opt-level=0 #![crate_type = "lib"] diff --git a/tests/codegen/issues/issue-98294-get-mut-copy-from-slice-opt.rs b/tests/codegen/issues/issue-98294-get-mut-copy-from-slice-opt.rs index b87e43c13b65..9f65222b3869 100644 --- a/tests/codegen/issues/issue-98294-get-mut-copy-from-slice-opt.rs +++ b/tests/codegen/issues/issue-98294-get-mut-copy-from-slice-opt.rs @@ -1,5 +1,5 @@ -// ignore-debug: The debug assertions get in the way -// compile-flags: -O +//@ ignore-debug: The debug assertions get in the way +//@ compile-flags: -O #![crate_type = "lib"] diff --git a/tests/codegen/issues/issue-99960.rs b/tests/codegen/issues/issue-99960.rs index ad0315a8227e..075495061750 100644 --- a/tests/codegen/issues/issue-99960.rs +++ b/tests/codegen/issues/issue-99960.rs @@ -1,4 +1,4 @@ -// compile-flags: -O +//@ compile-flags: -O #![crate_type = "lib"] diff --git a/tests/codegen/iter-repeat-n-trivial-drop.rs b/tests/codegen/iter-repeat-n-trivial-drop.rs index b052d339917d..d0838a3e860d 100644 --- a/tests/codegen/iter-repeat-n-trivial-drop.rs +++ b/tests/codegen/iter-repeat-n-trivial-drop.rs @@ -1,6 +1,6 @@ -// compile-flags: -O -// only-x86_64 -// ignore-debug: the debug assertions get in the way +//@ compile-flags: -O +//@ only-x86_64 +//@ ignore-debug: the debug assertions get in the way #![crate_type = "lib"] #![feature(iter_repeat_n)] diff --git a/tests/codegen/layout-size-checks.rs b/tests/codegen/layout-size-checks.rs index d067cc10a948..55c2e86b40bb 100644 --- a/tests/codegen/layout-size-checks.rs +++ b/tests/codegen/layout-size-checks.rs @@ -1,6 +1,6 @@ -// compile-flags: -O -// only-x86_64 -// ignore-debug: the debug assertions get in the way +//@ compile-flags: -O +//@ only-x86_64 +//@ ignore-debug: the debug assertions get in the way #![crate_type = "lib"] diff --git a/tests/codegen/lib-optimizations/iter-sum.rs b/tests/codegen/lib-optimizations/iter-sum.rs index ff7ca6ef6c11..6b6d61a30660 100644 --- a/tests/codegen/lib-optimizations/iter-sum.rs +++ b/tests/codegen/lib-optimizations/iter-sum.rs @@ -1,6 +1,6 @@ -// ignore-debug: the debug assertions get in the way -// compile-flags: -O -// only-x86_64 (vectorization varies between architectures) +//@ ignore-debug: the debug assertions get in the way +//@ compile-flags: -O +//@ only-x86_64 (vectorization varies between architectures) #![crate_type = "lib"] diff --git a/tests/codegen/lifetime_start_end.rs b/tests/codegen/lifetime_start_end.rs index 16175dc18c20..38e878451588 100644 --- a/tests/codegen/lifetime_start_end.rs +++ b/tests/codegen/lifetime_start_end.rs @@ -1,4 +1,4 @@ -// compile-flags: -O -C no-prepopulate-passes -Zmir-opt-level=0 +//@ compile-flags: -O -C no-prepopulate-passes -Zmir-opt-level=0 #![crate_type = "lib"] diff --git a/tests/codegen/link-dead-code.rs b/tests/codegen/link-dead-code.rs index de5a237c5f8a..7769622233f6 100644 --- a/tests/codegen/link-dead-code.rs +++ b/tests/codegen/link-dead-code.rs @@ -1,4 +1,4 @@ -// compile-flags:-Clink-dead-code +//@ compile-flags:-Clink-dead-code #![crate_type = "rlib"] diff --git a/tests/codegen/link_section.rs b/tests/codegen/link_section.rs index 2b26b604ad32..6747feba211b 100644 --- a/tests/codegen/link_section.rs +++ b/tests/codegen/link_section.rs @@ -1,5 +1,5 @@ -// ignore-emscripten default visibility is hidden -// compile-flags: -C no-prepopulate-passes +//@ ignore-emscripten default visibility is hidden +//@ compile-flags: -C no-prepopulate-passes #![crate_type = "lib"] diff --git a/tests/codegen/llvm-ident.rs b/tests/codegen/llvm-ident.rs index 927f0d602ad7..923e99bb282c 100644 --- a/tests/codegen/llvm-ident.rs +++ b/tests/codegen/llvm-ident.rs @@ -1,9 +1,9 @@ // Verifies that the `!llvm.ident` named metadata is emitted. // -// revisions: NONE OPT DEBUG +//@ revisions: NONE OPT DEBUG // -// [OPT] compile-flags: -Copt-level=2 -// [DEBUG] compile-flags: -Cdebuginfo=2 +//@ [OPT] compile-flags: -Copt-level=2 +//@ [DEBUG] compile-flags: -Cdebuginfo=2 // The named metadata should contain a single metadata node (see // `LLVMRustPrepareThinLTOImport` for details). diff --git a/tests/codegen/llvm_module_flags.rs b/tests/codegen/llvm_module_flags.rs index acc035086de2..d3fae0c3927d 100644 --- a/tests/codegen/llvm_module_flags.rs +++ b/tests/codegen/llvm_module_flags.rs @@ -1,5 +1,5 @@ // Test for -Z llvm_module_flags -// compile-flags: -Z llvm_module_flag=foo:u32:123:error -Z llvm_module_flag=bar:u32:42:max +//@ compile-flags: -Z llvm_module_flag=foo:u32:123:error -Z llvm_module_flag=bar:u32:42:max fn main() {} diff --git a/tests/codegen/loads.rs b/tests/codegen/loads.rs index 4a09a1dc0339..0471d83c25a3 100644 --- a/tests/codegen/loads.rs +++ b/tests/codegen/loads.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes -Zmir-opt-level=0 +//@ compile-flags: -C no-prepopulate-passes -Zmir-opt-level=0 #![crate_type = "lib"] diff --git a/tests/codegen/local-generics-in-exe-internalized.rs b/tests/codegen/local-generics-in-exe-internalized.rs index 449c5ca75fcd..8dbc41382b5a 100644 --- a/tests/codegen/local-generics-in-exe-internalized.rs +++ b/tests/codegen/local-generics-in-exe-internalized.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes -Zshare-generics=yes -Zinline-mir=no +//@ compile-flags: -C no-prepopulate-passes -Zshare-generics=yes -Zinline-mir=no // Check that local generics are internalized if they are in the same CGU diff --git a/tests/codegen/loongarch-abi/call-llvm-intrinsics.rs b/tests/codegen/loongarch-abi/call-llvm-intrinsics.rs index 4b78f6e24f7b..9a50f7b8e3a5 100644 --- a/tests/codegen/loongarch-abi/call-llvm-intrinsics.rs +++ b/tests/codegen/loongarch-abi/call-llvm-intrinsics.rs @@ -1,6 +1,6 @@ -// compile-flags: -C no-prepopulate-passes +//@ compile-flags: -C no-prepopulate-passes -// only-loongarch64 +//@ only-loongarch64 #![feature(link_llvm_intrinsics)] #![crate_type = "lib"] diff --git a/tests/codegen/loongarch-abi/loongarch64-lp64d-abi.rs b/tests/codegen/loongarch-abi/loongarch64-lp64d-abi.rs index 591ccd45ab62..3c895eb9531a 100644 --- a/tests/codegen/loongarch-abi/loongarch64-lp64d-abi.rs +++ b/tests/codegen/loongarch-abi/loongarch64-lp64d-abi.rs @@ -1,6 +1,6 @@ -// compile-flags: -C no-prepopulate-passes -// only-loongarch64 -// only-linux +//@ compile-flags: -C no-prepopulate-passes +//@ only-loongarch64 +//@ only-linux #![crate_type = "lib"] diff --git a/tests/codegen/lto-removes-invokes.rs b/tests/codegen/lto-removes-invokes.rs index 3979a97dc01b..f0102c25d5bd 100644 --- a/tests/codegen/lto-removes-invokes.rs +++ b/tests/codegen/lto-removes-invokes.rs @@ -1,5 +1,5 @@ -// compile-flags: -C lto -C panic=abort -O -// no-prefer-dynamic +//@ compile-flags: -C lto -C panic=abort -O +//@ no-prefer-dynamic fn main() { foo(); diff --git a/tests/codegen/macos/i686-macosx-deployment-target.rs b/tests/codegen/macos/i686-macosx-deployment-target.rs index ba49178dcb6b..b854476de418 100644 --- a/tests/codegen/macos/i686-macosx-deployment-target.rs +++ b/tests/codegen/macos/i686-macosx-deployment-target.rs @@ -2,9 +2,9 @@ // Checks that we correctly modify the target when MACOSX_DEPLOYMENT_TARGET is set. // See issue #60235. -// compile-flags: -O --target=i686-apple-darwin --crate-type=rlib -// needs-llvm-components: x86 -// rustc-env:MACOSX_DEPLOYMENT_TARGET=10.14 +//@ compile-flags: -O --target=i686-apple-darwin --crate-type=rlib +//@ needs-llvm-components: x86 +//@ rustc-env:MACOSX_DEPLOYMENT_TARGET=10.14 #![feature(no_core, lang_items)] #![no_core] diff --git a/tests/codegen/macos/i686-no-macosx-deployment-target.rs b/tests/codegen/macos/i686-no-macosx-deployment-target.rs index 479fe7968f78..a49a3467e7a0 100644 --- a/tests/codegen/macos/i686-no-macosx-deployment-target.rs +++ b/tests/codegen/macos/i686-no-macosx-deployment-target.rs @@ -2,9 +2,9 @@ // Checks that we leave the target alone MACOSX_DEPLOYMENT_TARGET is unset. // See issue #60235. -// compile-flags: -O --target=i686-apple-darwin --crate-type=rlib -// needs-llvm-components: x86 -// unset-rustc-env:MACOSX_DEPLOYMENT_TARGET +//@ compile-flags: -O --target=i686-apple-darwin --crate-type=rlib +//@ needs-llvm-components: x86 +//@ unset-rustc-env:MACOSX_DEPLOYMENT_TARGET #![feature(no_core, lang_items)] #![no_core] diff --git a/tests/codegen/macos/x86_64-macosx-deployment-target.rs b/tests/codegen/macos/x86_64-macosx-deployment-target.rs index 957c727bb93a..eac989c29541 100644 --- a/tests/codegen/macos/x86_64-macosx-deployment-target.rs +++ b/tests/codegen/macos/x86_64-macosx-deployment-target.rs @@ -2,9 +2,9 @@ // Checks that we correctly modify the target when MACOSX_DEPLOYMENT_TARGET is set. // See issue #60235. -// compile-flags: -O --target=x86_64-apple-darwin --crate-type=rlib -// needs-llvm-components: x86 -// rustc-env:MACOSX_DEPLOYMENT_TARGET=10.14 +//@ compile-flags: -O --target=x86_64-apple-darwin --crate-type=rlib +//@ needs-llvm-components: x86 +//@ rustc-env:MACOSX_DEPLOYMENT_TARGET=10.14 #![feature(no_core, lang_items)] #![no_core] diff --git a/tests/codegen/macos/x86_64-no-macosx-deployment-target.rs b/tests/codegen/macos/x86_64-no-macosx-deployment-target.rs index edbc1b66c713..ed294cf4e3dc 100644 --- a/tests/codegen/macos/x86_64-no-macosx-deployment-target.rs +++ b/tests/codegen/macos/x86_64-no-macosx-deployment-target.rs @@ -2,9 +2,9 @@ // Checks that we leave the target alone when MACOSX_DEPLOYMENT_TARGET is unset. // See issue #60235. -// compile-flags: -O --target=x86_64-apple-darwin --crate-type=rlib -// needs-llvm-components: x86 -// unset-rustc-env:MACOSX_DEPLOYMENT_TARGET +//@ compile-flags: -O --target=x86_64-apple-darwin --crate-type=rlib +//@ needs-llvm-components: x86 +//@ unset-rustc-env:MACOSX_DEPLOYMENT_TARGET #![feature(no_core, lang_items)] #![no_core] diff --git a/tests/codegen/mainsubprogram.rs b/tests/codegen/mainsubprogram.rs index 790db33437b0..8e173df0e86a 100644 --- a/tests/codegen/mainsubprogram.rs +++ b/tests/codegen/mainsubprogram.rs @@ -1,10 +1,10 @@ // This test depends on a patch that was committed to upstream LLVM // before 4.0, formerly backported to the Rust LLVM fork. -// ignore-windows -// ignore-macos +//@ ignore-windows +//@ ignore-macos -// compile-flags: -g -C no-prepopulate-passes +//@ compile-flags: -g -C no-prepopulate-passes // CHECK-LABEL: @main // CHECK: {{.*}}DISubprogram{{.*}}name: "main",{{.*}}DI{{(SP)?}}FlagMainSubprogram{{.*}} diff --git a/tests/codegen/mainsubprogramstart.rs b/tests/codegen/mainsubprogramstart.rs index d4de9f59ac27..db2c1466bf5f 100644 --- a/tests/codegen/mainsubprogramstart.rs +++ b/tests/codegen/mainsubprogramstart.rs @@ -1,7 +1,7 @@ -// ignore-windows -// ignore-macos +//@ ignore-windows +//@ ignore-macos -// compile-flags: -g -C no-prepopulate-passes +//@ compile-flags: -g -C no-prepopulate-passes #![feature(start)] diff --git a/tests/codegen/match-optimized.rs b/tests/codegen/match-optimized.rs index e32a5e545042..09907edf8f29 100644 --- a/tests/codegen/match-optimized.rs +++ b/tests/codegen/match-optimized.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes -O +//@ compile-flags: -C no-prepopulate-passes -O #![crate_type = "lib"] diff --git a/tests/codegen/match-optimizes-away.rs b/tests/codegen/match-optimizes-away.rs index 400606b42d55..55ece89cec21 100644 --- a/tests/codegen/match-optimizes-away.rs +++ b/tests/codegen/match-optimizes-away.rs @@ -1,5 +1,5 @@ // -// compile-flags: -O +//@ compile-flags: -O #![crate_type="lib"] pub enum Three { A, B, C } diff --git a/tests/codegen/match-unoptimized.rs b/tests/codegen/match-unoptimized.rs index 78ea4f9b4094..3dfe78c3e16a 100644 --- a/tests/codegen/match-unoptimized.rs +++ b/tests/codegen/match-unoptimized.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes -Copt-level=0 +//@ compile-flags: -C no-prepopulate-passes -Copt-level=0 #![crate_type = "lib"] diff --git a/tests/codegen/maybeuninit-rvo.rs b/tests/codegen/maybeuninit-rvo.rs index feed513e1fbf..954514c736bd 100644 --- a/tests/codegen/maybeuninit-rvo.rs +++ b/tests/codegen/maybeuninit-rvo.rs @@ -1,4 +1,4 @@ -// compile-flags: -O +//@ compile-flags: -O #![feature(c_unwind)] #![crate_type = "lib"] diff --git a/tests/codegen/mem-replace-big-type.rs b/tests/codegen/mem-replace-big-type.rs index fc3e9d22bdf3..0234b63aba5e 100644 --- a/tests/codegen/mem-replace-big-type.rs +++ b/tests/codegen/mem-replace-big-type.rs @@ -3,8 +3,8 @@ // may e.g. multiply `size_of::()` with a variable "count" (which is only // known to be `1` after inlining). -// compile-flags: -C no-prepopulate-passes -Zinline-mir=no -// ignore-debug: the debug assertions get in the way +//@ compile-flags: -C no-prepopulate-passes -Zinline-mir=no +//@ ignore-debug: the debug assertions get in the way #![crate_type = "lib"] diff --git a/tests/codegen/mem-replace-simple-type.rs b/tests/codegen/mem-replace-simple-type.rs index be3af989ef01..b6885aad9e40 100644 --- a/tests/codegen/mem-replace-simple-type.rs +++ b/tests/codegen/mem-replace-simple-type.rs @@ -1,6 +1,6 @@ -// compile-flags: -O -C no-prepopulate-passes -// only-x86_64 (to not worry about usize differing) -// ignore-debug (the debug assertions get in the way) +//@ compile-flags: -O -C no-prepopulate-passes +//@ only-x86_64 (to not worry about usize differing) +//@ ignore-debug (the debug assertions get in the way) #![crate_type = "lib"] diff --git a/tests/codegen/merge-functions.rs b/tests/codegen/merge-functions.rs index d6caeeee8966..8e4b65c9ee65 100644 --- a/tests/codegen/merge-functions.rs +++ b/tests/codegen/merge-functions.rs @@ -1,6 +1,6 @@ -// revisions: O Os -//[Os] compile-flags: -Copt-level=s -//[O] compile-flags: -O +//@ revisions: O Os +//@[Os] compile-flags: -Copt-level=s +//@[O] compile-flags: -O #![crate_type = "lib"] // CHECK: @func{{2|1}} = {{.*}}alias{{.*}}@func{{1|2}} diff --git a/tests/codegen/method-declaration.rs b/tests/codegen/method-declaration.rs index 4ae332b0107b..de2f96a51515 100644 --- a/tests/codegen/method-declaration.rs +++ b/tests/codegen/method-declaration.rs @@ -1,4 +1,4 @@ -// compile-flags: -g -Cno-prepopulate-passes +//@ compile-flags: -g -Cno-prepopulate-passes // Verify that we added a declaration for a method. diff --git a/tests/codegen/mir-inlined-line-numbers.rs b/tests/codegen/mir-inlined-line-numbers.rs index d13527b95213..57978bc70976 100644 --- a/tests/codegen/mir-inlined-line-numbers.rs +++ b/tests/codegen/mir-inlined-line-numbers.rs @@ -1,4 +1,4 @@ -// compile-flags: -O -g +//@ compile-flags: -O -g #![crate_type = "lib"] diff --git a/tests/codegen/mir_zst_stores.rs b/tests/codegen/mir_zst_stores.rs index 17e7ba3093bf..667273c2f0f7 100644 --- a/tests/codegen/mir_zst_stores.rs +++ b/tests/codegen/mir_zst_stores.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes +//@ compile-flags: -C no-prepopulate-passes #![crate_type = "lib"] use std::marker::PhantomData; diff --git a/tests/codegen/move-before-nocapture-ref-arg.rs b/tests/codegen/move-before-nocapture-ref-arg.rs index c7b400c8f8d0..a530bc266729 100644 --- a/tests/codegen/move-before-nocapture-ref-arg.rs +++ b/tests/codegen/move-before-nocapture-ref-arg.rs @@ -1,7 +1,7 @@ // Verify that move before the call of the function with noalias, nocapture, readonly. // #107436 -// compile-flags: -O -// min-llvm-version: 17 +//@ compile-flags: -O +//@ min-llvm-version: 17 #![crate_type = "lib"] diff --git a/tests/codegen/move-operands.rs b/tests/codegen/move-operands.rs index cd87e6d813ca..4f22921b4a3d 100644 --- a/tests/codegen/move-operands.rs +++ b/tests/codegen/move-operands.rs @@ -1,5 +1,5 @@ // Verify that optimized MIR only copies `a` once. -// compile-flags: -O -C no-prepopulate-passes +//@ compile-flags: -O -C no-prepopulate-passes #![crate_type = "lib"] diff --git a/tests/codegen/naked-fn/naked-functions.rs b/tests/codegen/naked-fn/naked-functions.rs index e05bbc26e830..755dd1551126 100644 --- a/tests/codegen/naked-fn/naked-functions.rs +++ b/tests/codegen/naked-fn/naked-functions.rs @@ -1,6 +1,6 @@ -// compile-flags: -C no-prepopulate-passes -Copt-level=0 -// needs-asm-support -// only-x86_64 +//@ compile-flags: -C no-prepopulate-passes -Copt-level=0 +//@ needs-asm-support +//@ only-x86_64 #![crate_type = "lib"] #![feature(naked_functions)] diff --git a/tests/codegen/naked-fn/naked-nocoverage.rs b/tests/codegen/naked-fn/naked-nocoverage.rs index 3c755e49c6db..e8d3b5834fa3 100644 --- a/tests/codegen/naked-fn/naked-nocoverage.rs +++ b/tests/codegen/naked-fn/naked-nocoverage.rs @@ -1,9 +1,9 @@ // Checks that naked functions are not instrumented by -Cinstrument-coverage. // Regression test for issue #105170. // -// needs-asm-support -// needs-profiler-support -// compile-flags: -Cinstrument-coverage +//@ needs-asm-support +//@ needs-profiler-support +//@ compile-flags: -Cinstrument-coverage #![crate_type = "lib"] #![feature(naked_functions)] use std::arch::asm; diff --git a/tests/codegen/naked-fn/naked-noinline.rs b/tests/codegen/naked-fn/naked-noinline.rs index 5cfb500c0ef8..c1e8f368249f 100644 --- a/tests/codegen/naked-fn/naked-noinline.rs +++ b/tests/codegen/naked-fn/naked-noinline.rs @@ -1,7 +1,7 @@ // Checks that naked functions are never inlined. -// compile-flags: -O -Zmir-opt-level=3 -// needs-asm-support -// ignore-wasm32 +//@ compile-flags: -O -Zmir-opt-level=3 +//@ needs-asm-support +//@ ignore-wasm32 #![crate_type = "lib"] #![feature(naked_functions)] diff --git a/tests/codegen/no-assumes-on-casts.rs b/tests/codegen/no-assumes-on-casts.rs index b5cfa2775abb..b9c264daa2d1 100644 --- a/tests/codegen/no-assumes-on-casts.rs +++ b/tests/codegen/no-assumes-on-casts.rs @@ -1,6 +1,6 @@ #![crate_type = "lib"] -// compile-flags: -Cno-prepopulate-passes +//@ compile-flags: -Cno-prepopulate-passes // CHECK-LABEL: fna #[no_mangle] diff --git a/tests/codegen/no-dllimport-w-cross-lang-lto.rs b/tests/codegen/no-dllimport-w-cross-lang-lto.rs index 33fc2bc1540d..c71eddfa287d 100644 --- a/tests/codegen/no-dllimport-w-cross-lang-lto.rs +++ b/tests/codegen/no-dllimport-w-cross-lang-lto.rs @@ -1,9 +1,9 @@ // This test makes sure that functions get annotated with the proper // "target-cpu" attribute in LLVM. -// no-prefer-dynamic -// only-msvc -// compile-flags: -C linker-plugin-lto +//@ no-prefer-dynamic +//@ only-msvc +//@ compile-flags: -C linker-plugin-lto #![crate_type = "rlib"] diff --git a/tests/codegen/no-jump-tables.rs b/tests/codegen/no-jump-tables.rs index 8e2cb47566ea..654da2cec11c 100644 --- a/tests/codegen/no-jump-tables.rs +++ b/tests/codegen/no-jump-tables.rs @@ -1,10 +1,10 @@ // Test that the `no-jump-tables` function attribute are (not) emitted when // the `-Zno-jump-tables` flag is (not) set. -// revisions: unset set -// needs-llvm-components: x86 -// compile-flags: --target x86_64-unknown-linux-gnu -// [set] compile-flags: -Zno-jump-tables +//@ revisions: unset set +//@ needs-llvm-components: x86 +//@ compile-flags: --target x86_64-unknown-linux-gnu +//@ [set] compile-flags: -Zno-jump-tables #![crate_type = "lib"] #![feature(no_core, lang_items)] diff --git a/tests/codegen/no-plt.rs b/tests/codegen/no-plt.rs index b36e9ae88f45..3a3546ff7c40 100644 --- a/tests/codegen/no-plt.rs +++ b/tests/codegen/no-plt.rs @@ -1,4 +1,4 @@ -// compile-flags: -C relocation-model=pic -Z plt=no +//@ compile-flags: -C relocation-model=pic -Z plt=no #![crate_type = "lib"] diff --git a/tests/codegen/no_builtins-at-crate.rs b/tests/codegen/no_builtins-at-crate.rs index 02ed670900ed..ba1d31f60c39 100644 --- a/tests/codegen/no_builtins-at-crate.rs +++ b/tests/codegen/no_builtins-at-crate.rs @@ -1,4 +1,4 @@ -// compile-flags: -C opt-level=1 +//@ compile-flags: -C opt-level=1 #![no_builtins] #![crate_type = "lib"] diff --git a/tests/codegen/noalias-box-off.rs b/tests/codegen/noalias-box-off.rs index c82c53b2a489..1642103903a0 100644 --- a/tests/codegen/noalias-box-off.rs +++ b/tests/codegen/noalias-box-off.rs @@ -1,4 +1,4 @@ -// compile-flags: -O -Z box-noalias=no +//@ compile-flags: -O -Z box-noalias=no #![crate_type = "lib"] diff --git a/tests/codegen/noalias-box.rs b/tests/codegen/noalias-box.rs index a3d1f093d8bd..06f94691c895 100644 --- a/tests/codegen/noalias-box.rs +++ b/tests/codegen/noalias-box.rs @@ -1,4 +1,4 @@ -// compile-flags: -O +//@ compile-flags: -O #![crate_type = "lib"] diff --git a/tests/codegen/noalias-flag.rs b/tests/codegen/noalias-flag.rs index a9ec61e286d0..35b94d813d5f 100644 --- a/tests/codegen/noalias-flag.rs +++ b/tests/codegen/noalias-flag.rs @@ -1,4 +1,4 @@ -// compile-flags: -O -Zmutable-noalias=no +//@ compile-flags: -O -Zmutable-noalias=no #![crate_type = "lib"] diff --git a/tests/codegen/noalias-refcell.rs b/tests/codegen/noalias-refcell.rs index dba73937abf1..51d13967bece 100644 --- a/tests/codegen/noalias-refcell.rs +++ b/tests/codegen/noalias-refcell.rs @@ -1,4 +1,4 @@ -// compile-flags: -O -C no-prepopulate-passes -Z mutable-noalias=yes +//@ compile-flags: -O -C no-prepopulate-passes -Z mutable-noalias=yes #![crate_type = "lib"] diff --git a/tests/codegen/noalias-rwlockreadguard.rs b/tests/codegen/noalias-rwlockreadguard.rs index 7f7b46c85a8b..7b870cb28b4f 100644 --- a/tests/codegen/noalias-rwlockreadguard.rs +++ b/tests/codegen/noalias-rwlockreadguard.rs @@ -1,4 +1,4 @@ -// compile-flags: -O -C no-prepopulate-passes -Z mutable-noalias=yes +//@ compile-flags: -O -C no-prepopulate-passes -Z mutable-noalias=yes #![crate_type = "lib"] diff --git a/tests/codegen/noalias-unpin.rs b/tests/codegen/noalias-unpin.rs index 8ca9b98eee2f..546b1edb7b61 100644 --- a/tests/codegen/noalias-unpin.rs +++ b/tests/codegen/noalias-unpin.rs @@ -1,4 +1,4 @@ -// compile-flags: -O -Z mutable-noalias=yes +//@ compile-flags: -O -Z mutable-noalias=yes #![crate_type = "lib"] diff --git a/tests/codegen/non-terminate/infinite-loop-1.rs b/tests/codegen/non-terminate/infinite-loop-1.rs index fa9c66b47c0a..9eab4939aee9 100644 --- a/tests/codegen/non-terminate/infinite-loop-1.rs +++ b/tests/codegen/non-terminate/infinite-loop-1.rs @@ -1,4 +1,4 @@ -// compile-flags: -C opt-level=3 +//@ compile-flags: -C opt-level=3 #![crate_type = "lib"] diff --git a/tests/codegen/non-terminate/infinite-loop-2.rs b/tests/codegen/non-terminate/infinite-loop-2.rs index 81d62ab33d77..da29361cc967 100644 --- a/tests/codegen/non-terminate/infinite-loop-2.rs +++ b/tests/codegen/non-terminate/infinite-loop-2.rs @@ -1,4 +1,4 @@ -// compile-flags: -C opt-level=3 +//@ compile-flags: -C opt-level=3 #![crate_type = "lib"] diff --git a/tests/codegen/non-terminate/infinite-recursion.rs b/tests/codegen/non-terminate/infinite-recursion.rs index 6d1f2d4bf8f4..804704c0292e 100644 --- a/tests/codegen/non-terminate/infinite-recursion.rs +++ b/tests/codegen/non-terminate/infinite-recursion.rs @@ -1,4 +1,4 @@ -// compile-flags: -C opt-level=3 +//@ compile-flags: -C opt-level=3 #![crate_type = "lib"] diff --git a/tests/codegen/non-terminate/nonempty-infinite-loop.rs b/tests/codegen/non-terminate/nonempty-infinite-loop.rs index 5e25e04fc24a..0db4ee61b1bc 100644 --- a/tests/codegen/non-terminate/nonempty-infinite-loop.rs +++ b/tests/codegen/non-terminate/nonempty-infinite-loop.rs @@ -1,4 +1,4 @@ -// compile-flags: -C opt-level=3 +//@ compile-flags: -C opt-level=3 #![crate_type = "lib"] diff --git a/tests/codegen/noreturn-uninhabited.rs b/tests/codegen/noreturn-uninhabited.rs index 49f93cf62c75..a10795d3f3c0 100644 --- a/tests/codegen/noreturn-uninhabited.rs +++ b/tests/codegen/noreturn-uninhabited.rs @@ -1,4 +1,4 @@ -// compile-flags: -g -C no-prepopulate-passes +//@ compile-flags: -g -C no-prepopulate-passes #![crate_type = "lib"] diff --git a/tests/codegen/noreturnflag.rs b/tests/codegen/noreturnflag.rs index 95c100571ce6..a8f08628986a 100644 --- a/tests/codegen/noreturnflag.rs +++ b/tests/codegen/noreturnflag.rs @@ -1,4 +1,4 @@ -// compile-flags: -g -C no-prepopulate-passes +//@ compile-flags: -g -C no-prepopulate-passes #![crate_type = "lib"] diff --git a/tests/codegen/nounwind.rs b/tests/codegen/nounwind.rs index f639c60b8935..2b237ef01208 100644 --- a/tests/codegen/nounwind.rs +++ b/tests/codegen/nounwind.rs @@ -1,7 +1,7 @@ -// aux-build:nounwind.rs -// compile-flags: -C no-prepopulate-passes -C panic=abort -C metadata=a -// ignore-windows -// ignore-android +//@ aux-build:nounwind.rs +//@ compile-flags: -C no-prepopulate-passes -C panic=abort -C metadata=a +//@ ignore-windows +//@ ignore-android #![crate_type = "lib"] diff --git a/tests/codegen/nrvo.rs b/tests/codegen/nrvo.rs index b2ae99f3761b..aa8bed941f54 100644 --- a/tests/codegen/nrvo.rs +++ b/tests/codegen/nrvo.rs @@ -1,4 +1,4 @@ -// compile-flags: -O +//@ compile-flags: -O #![crate_type = "lib"] diff --git a/tests/codegen/optimize-attr-1.rs b/tests/codegen/optimize-attr-1.rs index d95ba853030f..c8e68779aae6 100644 --- a/tests/codegen/optimize-attr-1.rs +++ b/tests/codegen/optimize-attr-1.rs @@ -1,7 +1,7 @@ -// revisions: NO-OPT SIZE-OPT SPEED-OPT -//[NO-OPT] compile-flags: -Copt-level=0 -Ccodegen-units=1 -//[SIZE-OPT] compile-flags: -Copt-level=s -Ccodegen-units=1 -//[SPEED-OPT] compile-flags: -Copt-level=3 -Ccodegen-units=1 +//@ revisions: NO-OPT SIZE-OPT SPEED-OPT +//@[NO-OPT] compile-flags: -Copt-level=0 -Ccodegen-units=1 +//@[SIZE-OPT] compile-flags: -Copt-level=s -Ccodegen-units=1 +//@[SPEED-OPT] compile-flags: -Copt-level=3 -Ccodegen-units=1 #![feature(optimize_attribute)] #![crate_type="rlib"] diff --git a/tests/codegen/option-as-slice.rs b/tests/codegen/option-as-slice.rs index 1edd9ba9f7da..990ec1d1f66b 100644 --- a/tests/codegen/option-as-slice.rs +++ b/tests/codegen/option-as-slice.rs @@ -1,6 +1,6 @@ -// compile-flags: -O -Z randomize-layout=no -// only-x86_64 -// ignore-llvm-version: 16.0.0 +//@ compile-flags: -O -Z randomize-layout=no +//@ only-x86_64 +//@ ignore-llvm-version: 16.0.0 // ^ needs https://reviews.llvm.org/D146149 in 16.0.1 #![crate_type = "lib"] diff --git a/tests/codegen/option-nonzero-eq.rs b/tests/codegen/option-nonzero-eq.rs index ce5b6328af6c..f6be90a5ddeb 100644 --- a/tests/codegen/option-nonzero-eq.rs +++ b/tests/codegen/option-nonzero-eq.rs @@ -1,4 +1,4 @@ -// compile-flags: -O -Zmerge-functions=disabled +//@ compile-flags: -O -Zmerge-functions=disabled #![crate_type = "lib"] diff --git a/tests/codegen/overaligned-constant.rs b/tests/codegen/overaligned-constant.rs index 89e497389911..351c8ea8f4b2 100644 --- a/tests/codegen/overaligned-constant.rs +++ b/tests/codegen/overaligned-constant.rs @@ -1,9 +1,9 @@ // GVN may create indirect constants with higher alignment than their type requires. Verify that we // do not ICE during codegen, and that the LLVM constant has the higher alignment. // -// compile-flags: -Zmir-opt-level=0 -Zmir-enable-passes=+GVN -// compile-flags: -Cno-prepopulate-passes -// only-64bit +//@ compile-flags: -Zmir-opt-level=0 -Zmir-enable-passes=+GVN +//@ compile-flags: -Cno-prepopulate-passes +//@ only-64bit struct S(i32); diff --git a/tests/codegen/packed.rs b/tests/codegen/packed.rs index 96cd9a42e7dd..764476b0aa13 100644 --- a/tests/codegen/packed.rs +++ b/tests/codegen/packed.rs @@ -1,5 +1,5 @@ // -// compile-flags: -O -C no-prepopulate-passes +//@ compile-flags: -O -C no-prepopulate-passes #![crate_type = "lib"] diff --git a/tests/codegen/panic-abort-windows.rs b/tests/codegen/panic-abort-windows.rs index 2ee29762dcdf..71caa1b3d2af 100644 --- a/tests/codegen/panic-abort-windows.rs +++ b/tests/codegen/panic-abort-windows.rs @@ -1,7 +1,7 @@ // This test is for *-windows only. -// only-windows +//@ only-windows -// compile-flags: -C no-prepopulate-passes -C panic=abort -O +//@ compile-flags: -C no-prepopulate-passes -C panic=abort -O #![crate_type = "lib"] diff --git a/tests/codegen/panic-in-drop-abort.rs b/tests/codegen/panic-in-drop-abort.rs index 7a84484c4199..b150c537ad55 100644 --- a/tests/codegen/panic-in-drop-abort.rs +++ b/tests/codegen/panic-in-drop-abort.rs @@ -1,5 +1,5 @@ -// compile-flags: -Z panic-in-drop=abort -O -// ignore-msvc +//@ compile-flags: -Z panic-in-drop=abort -O +//@ ignore-msvc // Ensure that unwinding code paths are eliminated from the output after // optimization. diff --git a/tests/codegen/panic-unwind-default-uwtable.rs b/tests/codegen/panic-unwind-default-uwtable.rs index b78b159d20d5..06f616c519b2 100644 --- a/tests/codegen/panic-unwind-default-uwtable.rs +++ b/tests/codegen/panic-unwind-default-uwtable.rs @@ -1,4 +1,4 @@ -// compile-flags: -C panic=unwind -C no-prepopulate-passes -Copt-level=0 +//@ compile-flags: -C panic=unwind -C no-prepopulate-passes -Copt-level=0 #![crate_type = "lib"] diff --git a/tests/codegen/personality_lifetimes.rs b/tests/codegen/personality_lifetimes.rs index e2bc0ebcb373..06389688e0e2 100644 --- a/tests/codegen/personality_lifetimes.rs +++ b/tests/codegen/personality_lifetimes.rs @@ -1,8 +1,8 @@ -// ignore-msvc -// ignore-wasm32-bare compiled with panic=abort by default -// needs-unwind +//@ ignore-msvc +//@ ignore-wasm32-bare compiled with panic=abort by default +//@ needs-unwind -// compile-flags: -O -C no-prepopulate-passes +//@ compile-flags: -O -C no-prepopulate-passes #![crate_type="lib"] diff --git a/tests/codegen/pgo-counter-bias.rs b/tests/codegen/pgo-counter-bias.rs index 28caa7f4aa35..1263eaf206f7 100644 --- a/tests/codegen/pgo-counter-bias.rs +++ b/tests/codegen/pgo-counter-bias.rs @@ -1,9 +1,9 @@ // Test that __llvm_profile_counter_bias does not get internalized by lto. -// ignore-macos -runtime-counter-relocation not honored on Mach-O -// compile-flags: -Cprofile-generate -Cllvm-args=-runtime-counter-relocation -Clto=fat -// needs-profiler-support -// no-prefer-dynamic +//@ ignore-macos -runtime-counter-relocation not honored on Mach-O +//@ compile-flags: -Cprofile-generate -Cllvm-args=-runtime-counter-relocation -Clto=fat +//@ needs-profiler-support +//@ no-prefer-dynamic // CHECK: @__llvm_profile_counter_bias = {{.*}}global diff --git a/tests/codegen/pgo-instrumentation.rs b/tests/codegen/pgo-instrumentation.rs index 05c2d2fc0d8c..e2c348edf822 100644 --- a/tests/codegen/pgo-instrumentation.rs +++ b/tests/codegen/pgo-instrumentation.rs @@ -1,7 +1,7 @@ // Test that `-Cprofile-generate` creates expected instrumentation artifacts in LLVM IR. -// needs-profiler-support -// compile-flags: -Cprofile-generate -Ccodegen-units=1 +//@ needs-profiler-support +//@ compile-flags: -Cprofile-generate -Ccodegen-units=1 // CHECK: @__llvm_profile_raw_version = // CHECK-DAG: @__profc_{{.*}}pgo_instrumentation{{.*}}some_function{{.*}} = {{.*}}global diff --git a/tests/codegen/pic-relocation-model.rs b/tests/codegen/pic-relocation-model.rs index 518e949ffe34..10ade847133a 100644 --- a/tests/codegen/pic-relocation-model.rs +++ b/tests/codegen/pic-relocation-model.rs @@ -1,4 +1,4 @@ -// compile-flags: -C relocation-model=pic -Copt-level=0 +//@ compile-flags: -C relocation-model=pic -Copt-level=0 #![crate_type = "rlib"] diff --git a/tests/codegen/pie-relocation-model.rs b/tests/codegen/pie-relocation-model.rs index 941cca922bd3..20bf8919ac10 100644 --- a/tests/codegen/pie-relocation-model.rs +++ b/tests/codegen/pie-relocation-model.rs @@ -1,5 +1,5 @@ -// compile-flags: -C relocation-model=pie -Copt-level=0 -// only-x86_64-unknown-linux-gnu +//@ compile-flags: -C relocation-model=pie -Copt-level=0 +//@ only-x86_64-unknown-linux-gnu #![crate_type = "rlib"] diff --git a/tests/codegen/ptr-arithmetic.rs b/tests/codegen/ptr-arithmetic.rs index 292bfdaf3571..3a8bfee84ecf 100644 --- a/tests/codegen/ptr-arithmetic.rs +++ b/tests/codegen/ptr-arithmetic.rs @@ -1,5 +1,5 @@ -// compile-flags: -O -Z merge-functions=disabled -// ignore-debug (the extra assertions get in the way) +//@ compile-flags: -O -Z merge-functions=disabled +//@ ignore-debug (the extra assertions get in the way) #![crate_type = "lib"] diff --git a/tests/codegen/ptr-read-metadata.rs b/tests/codegen/ptr-read-metadata.rs index 94152ed11ba1..622a1cec4ac6 100644 --- a/tests/codegen/ptr-read-metadata.rs +++ b/tests/codegen/ptr-read-metadata.rs @@ -1,5 +1,5 @@ -// compile-flags: -O -Z merge-functions=disabled -// ignore-debug (the extra assertions get in the way) +//@ compile-flags: -O -Z merge-functions=disabled +//@ ignore-debug (the extra assertions get in the way) #![crate_type = "lib"] diff --git a/tests/codegen/refs.rs b/tests/codegen/refs.rs index 9e1205f5d1d5..40ce04c07a11 100644 --- a/tests/codegen/refs.rs +++ b/tests/codegen/refs.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes -Zmir-opt-level=0 -Copt-level=0 +//@ compile-flags: -C no-prepopulate-passes -Zmir-opt-level=0 -Copt-level=0 #![crate_type = "lib"] diff --git a/tests/codegen/remap_path_prefix/aux_mod.rs b/tests/codegen/remap_path_prefix/aux_mod.rs index 44cc4bb722d1..c37e91c705cc 100644 --- a/tests/codegen/remap_path_prefix/aux_mod.rs +++ b/tests/codegen/remap_path_prefix/aux_mod.rs @@ -1,4 +1,4 @@ -// ignore-test: this is not a test +//@ ignore-test: this is not a test #[inline] pub fn some_aux_mod_function() -> i32 { diff --git a/tests/codegen/remap_path_prefix/auxiliary/remap_path_prefix_aux.rs b/tests/codegen/remap_path_prefix/auxiliary/remap_path_prefix_aux.rs index 887915955b59..7afc16ec72f3 100644 --- a/tests/codegen/remap_path_prefix/auxiliary/remap_path_prefix_aux.rs +++ b/tests/codegen/remap_path_prefix/auxiliary/remap_path_prefix_aux.rs @@ -1,6 +1,6 @@ // -// compile-flags: -g --remap-path-prefix={{cwd}}=/the/aux-cwd --remap-path-prefix={{src-base}}/remap_path_prefix/auxiliary=/the/aux-src +//@ compile-flags: -g --remap-path-prefix={{cwd}}=/the/aux-cwd --remap-path-prefix={{src-base}}/remap_path_prefix/auxiliary=/the/aux-src #[inline] pub fn some_aux_function() -> i32 { diff --git a/tests/codegen/remap_path_prefix/auxiliary/xcrate-generic.rs b/tests/codegen/remap_path_prefix/auxiliary/xcrate-generic.rs index 15bd0f174218..9d5cdfe063b6 100644 --- a/tests/codegen/remap_path_prefix/auxiliary/xcrate-generic.rs +++ b/tests/codegen/remap_path_prefix/auxiliary/xcrate-generic.rs @@ -1,5 +1,5 @@ // -// compile-flags: -g --remap-path-prefix={{cwd}}=/the/aux-cwd --remap-path-prefix={{src-base}}/remap_path_prefix/auxiliary=/the/aux-src +//@ compile-flags: -g --remap-path-prefix={{cwd}}=/the/aux-cwd --remap-path-prefix={{src-base}}/remap_path_prefix/auxiliary=/the/aux-src #![crate_type = "lib"] diff --git a/tests/codegen/remap_path_prefix/issue-73167-remap-std.rs b/tests/codegen/remap_path_prefix/issue-73167-remap-std.rs index b66abc6bedf0..eb610168dd3b 100644 --- a/tests/codegen/remap_path_prefix/issue-73167-remap-std.rs +++ b/tests/codegen/remap_path_prefix/issue-73167-remap-std.rs @@ -1,6 +1,6 @@ -// ignore-windows +//@ ignore-windows -// compile-flags: -g -C no-prepopulate-passes -Z simulate-remapped-rust-src-base=/rustc/xyz +//@ compile-flags: -g -C no-prepopulate-passes -Z simulate-remapped-rust-src-base=/rustc/xyz // Here we check that importing std will not cause real path to std source files // to leak. If rustc was compiled with remap-debuginfo = true, this should be diff --git a/tests/codegen/remap_path_prefix/main.rs b/tests/codegen/remap_path_prefix/main.rs index f1e1dd69b969..bfbccfe0df80 100644 --- a/tests/codegen/remap_path_prefix/main.rs +++ b/tests/codegen/remap_path_prefix/main.rs @@ -1,8 +1,8 @@ -// ignore-windows +//@ ignore-windows // -// compile-flags: -g -C no-prepopulate-passes --remap-path-prefix={{cwd}}=/the/cwd --remap-path-prefix={{src-base}}=/the/src -Zinline-mir=no -// aux-build:remap_path_prefix_aux.rs +//@ compile-flags: -g -C no-prepopulate-passes --remap-path-prefix={{cwd}}=/the/cwd --remap-path-prefix={{src-base}}=/the/src -Zinline-mir=no +//@ aux-build:remap_path_prefix_aux.rs extern crate remap_path_prefix_aux; diff --git a/tests/codegen/remap_path_prefix/xcrate-generic.rs b/tests/codegen/remap_path_prefix/xcrate-generic.rs index 399deec1fc93..db69b72d9049 100644 --- a/tests/codegen/remap_path_prefix/xcrate-generic.rs +++ b/tests/codegen/remap_path_prefix/xcrate-generic.rs @@ -1,6 +1,6 @@ -// ignore-windows -// compile-flags: -g -C metadata=foo -C no-prepopulate-passes -// aux-build:xcrate-generic.rs +//@ ignore-windows +//@ compile-flags: -g -C metadata=foo -C no-prepopulate-passes +//@ aux-build:xcrate-generic.rs #![crate_type = "lib"] diff --git a/tests/codegen/repeat-trusted-len.rs b/tests/codegen/repeat-trusted-len.rs index bd6ff977e1fe..fa01f2b4969d 100644 --- a/tests/codegen/repeat-trusted-len.rs +++ b/tests/codegen/repeat-trusted-len.rs @@ -1,4 +1,4 @@ -// compile-flags: -O +//@ compile-flags: -O // #![crate_type = "lib"] diff --git a/tests/codegen/repr/transparent-imm-array.rs b/tests/codegen/repr/transparent-imm-array.rs index 6d7127785095..842e36ca13da 100644 --- a/tests/codegen/repr/transparent-imm-array.rs +++ b/tests/codegen/repr/transparent-imm-array.rs @@ -1,11 +1,11 @@ -// revisions: arm mips thumb wasm32 -// compile-flags: -C no-prepopulate-passes +//@ revisions: arm mips thumb wasm32 +//@ compile-flags: -C no-prepopulate-passes // -//[arm] only-arm -//[mips] only-mips -//[thumb] only-thumb -//[wasm32] only-wasm32 -// ignore-emscripten +//@[arm] only-arm +//@[mips] only-mips +//@[thumb] only-thumb +//@[wasm32] only-wasm32 +//@ ignore-emscripten // See ./transparent.rs // Some platforms pass large aggregates using immediate arrays in LLVMIR // Other platforms pass large aggregates using struct pointer in LLVMIR diff --git a/tests/codegen/repr/transparent-mips64.rs b/tests/codegen/repr/transparent-mips64.rs index 245daf13e28f..55090e6bd808 100644 --- a/tests/codegen/repr/transparent-mips64.rs +++ b/tests/codegen/repr/transparent-mips64.rs @@ -1,7 +1,7 @@ -// compile-flags: -C no-prepopulate-passes +//@ compile-flags: -C no-prepopulate-passes // -// only-mips64 +//@ only-mips64 // See ./transparent.rs #![feature(transparent_unions)] diff --git a/tests/codegen/repr/transparent-struct-ptr.rs b/tests/codegen/repr/transparent-struct-ptr.rs index d2120f7ec143..ff531029e046 100644 --- a/tests/codegen/repr/transparent-struct-ptr.rs +++ b/tests/codegen/repr/transparent-struct-ptr.rs @@ -1,11 +1,11 @@ -// revisions: x32 x64 sparc sparc64 -// compile-flags: -O -C no-prepopulate-passes +//@ revisions: x32 x64 sparc sparc64 +//@ compile-flags: -O -C no-prepopulate-passes // -//[x32] only-x86 -//[x64] only-x86_64 -//[sparc] only-sparc -//[sparc64] only-sparc64 -// ignore-windows +//@[x32] only-x86 +//@[x64] only-x86_64 +//@[sparc] only-sparc +//@[sparc64] only-sparc64 +//@ ignore-windows // See ./transparent.rs // Some platforms pass large aggregates using immediate arrays in LLVMIR // Other platforms pass large aggregates using struct pointer in LLVMIR diff --git a/tests/codegen/repr/transparent-sysv64.rs b/tests/codegen/repr/transparent-sysv64.rs index 886b0dd9e7b0..10524adf7d7a 100644 --- a/tests/codegen/repr/transparent-sysv64.rs +++ b/tests/codegen/repr/transparent-sysv64.rs @@ -1,6 +1,6 @@ -// only-x86_64 +//@ only-x86_64 -// compile-flags: -C no-prepopulate-passes +//@ compile-flags: -C no-prepopulate-passes #![crate_type="lib"] diff --git a/tests/codegen/repr/transparent.rs b/tests/codegen/repr/transparent.rs index c5974248bb37..17ec476035f2 100644 --- a/tests/codegen/repr/transparent.rs +++ b/tests/codegen/repr/transparent.rs @@ -1,7 +1,7 @@ -// compile-flags: -O -C no-prepopulate-passes -// ignore-riscv64 riscv64 has an i128 type used with test_Vector -// ignore-s390x s390x with default march passes vector types per reference -// ignore-loongarch64 see codegen/loongarch-abi for loongarch function call tests +//@ compile-flags: -O -C no-prepopulate-passes +//@ ignore-riscv64 riscv64 has an i128 type used with test_Vector +//@ ignore-s390x s390x with default march passes vector types per reference +//@ ignore-loongarch64 see codegen/loongarch-abi for loongarch function call tests // This codegen test embeds assumptions about how certain "C" psABIs are handled // so it doesn't apply to all architectures or even all OS diff --git a/tests/codegen/riscv-abi/call-llvm-intrinsics.rs b/tests/codegen/riscv-abi/call-llvm-intrinsics.rs index 31a88f2c0a98..c3f795e88576 100644 --- a/tests/codegen/riscv-abi/call-llvm-intrinsics.rs +++ b/tests/codegen/riscv-abi/call-llvm-intrinsics.rs @@ -1,6 +1,6 @@ -// compile-flags: -C no-prepopulate-passes +//@ compile-flags: -C no-prepopulate-passes -// only-riscv64 +//@ only-riscv64 #![feature(link_llvm_intrinsics)] #![crate_type = "lib"] diff --git a/tests/codegen/riscv-abi/riscv64-lp64-lp64f-lp64d-abi.rs b/tests/codegen/riscv-abi/riscv64-lp64-lp64f-lp64d-abi.rs index fdb9c6217de9..95c936ece730 100644 --- a/tests/codegen/riscv-abi/riscv64-lp64-lp64f-lp64d-abi.rs +++ b/tests/codegen/riscv-abi/riscv64-lp64-lp64f-lp64d-abi.rs @@ -1,5 +1,5 @@ -// compile-flags: --target riscv64gc-unknown-linux-gnu -O -C no-prepopulate-passes -// needs-llvm-components: riscv +//@ compile-flags: --target riscv64gc-unknown-linux-gnu -O -C no-prepopulate-passes +//@ needs-llvm-components: riscv #![crate_type = "lib"] #![no_core] diff --git a/tests/codegen/riscv-abi/riscv64-lp64d-abi.rs b/tests/codegen/riscv-abi/riscv64-lp64d-abi.rs index 1555acadfbcc..060d91a2696a 100644 --- a/tests/codegen/riscv-abi/riscv64-lp64d-abi.rs +++ b/tests/codegen/riscv-abi/riscv64-lp64d-abi.rs @@ -1,7 +1,7 @@ // -// compile-flags: -C no-prepopulate-passes -// only-riscv64 -// only-linux +//@ compile-flags: -C no-prepopulate-passes +//@ only-riscv64 +//@ only-linux #![crate_type = "lib"] // CHECK: define void @f_fpr_tracking(double %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7, i8 zeroext %i) diff --git a/tests/codegen/riscv-abi/riscv64-lp64f-lp64d-abi.rs b/tests/codegen/riscv-abi/riscv64-lp64f-lp64d-abi.rs index f08fabed421d..3d0512817f7c 100644 --- a/tests/codegen/riscv-abi/riscv64-lp64f-lp64d-abi.rs +++ b/tests/codegen/riscv-abi/riscv64-lp64f-lp64d-abi.rs @@ -1,7 +1,7 @@ // -// compile-flags: -C no-prepopulate-passes -// only-riscv64 -// only-linux +//@ compile-flags: -C no-prepopulate-passes +//@ only-riscv64 +//@ only-linux #![crate_type = "lib"] // CHECK: define void @f_fpr_tracking(float %0, float %1, float %2, float %3, float %4, float %5, float %6, float %7, i8 zeroext %i) diff --git a/tests/codegen/sanitizer/address-sanitizer-globals-tracking.rs b/tests/codegen/sanitizer/address-sanitizer-globals-tracking.rs index e9dd04e1927b..8ffa235c18f1 100644 --- a/tests/codegen/sanitizer/address-sanitizer-globals-tracking.rs +++ b/tests/codegen/sanitizer/address-sanitizer-globals-tracking.rs @@ -15,13 +15,13 @@ // narrower than really needed (i.e. narrower than ELF-or-MachO), but this seems ok - having a // linux-only regression test should be sufficient here. // -// needs-sanitizer-address -// only-linux +//@ needs-sanitizer-address +//@ only-linux // -// revisions:ASAN ASAN-FAT-LTO -// compile-flags: -Zsanitizer=address -Ctarget-feature=-crt-static -//[ASAN] compile-flags: -//[ASAN-FAT-LTO] compile-flags: -Cprefer-dynamic=false -Clto=fat +//@ revisions:ASAN ASAN-FAT-LTO +//@ compile-flags: -Zsanitizer=address -Ctarget-feature=-crt-static +//@[ASAN] compile-flags: +//@[ASAN-FAT-LTO] compile-flags: -Cprefer-dynamic=false -Clto=fat #![crate_type="staticlib"] diff --git a/tests/codegen/sanitizer/cfi-add-canonical-jump-tables-flag.rs b/tests/codegen/sanitizer/cfi-add-canonical-jump-tables-flag.rs index 1ee8bdfc3ab2..f122fbdc0866 100644 --- a/tests/codegen/sanitizer/cfi-add-canonical-jump-tables-flag.rs +++ b/tests/codegen/sanitizer/cfi-add-canonical-jump-tables-flag.rs @@ -1,7 +1,7 @@ // Verifies that "CFI Canonical Jump Tables" module flag is added. // -// needs-sanitizer-cfi -// compile-flags: -Clto -Ctarget-feature=-crt-static -Zsanitizer=cfi +//@ needs-sanitizer-cfi +//@ compile-flags: -Clto -Ctarget-feature=-crt-static -Zsanitizer=cfi #![crate_type="lib"] diff --git a/tests/codegen/sanitizer/cfi-add-enable-split-lto-unit-flag.rs b/tests/codegen/sanitizer/cfi-add-enable-split-lto-unit-flag.rs index 68c91384b826..05eea13c6ee0 100644 --- a/tests/codegen/sanitizer/cfi-add-enable-split-lto-unit-flag.rs +++ b/tests/codegen/sanitizer/cfi-add-enable-split-lto-unit-flag.rs @@ -1,7 +1,7 @@ // Verifies that "EnableSplitLTOUnit" module flag is added. // -// needs-sanitizer-cfi -// compile-flags: -Clto -Ctarget-feature=-crt-static -Zsanitizer=cfi +//@ needs-sanitizer-cfi +//@ compile-flags: -Clto -Ctarget-feature=-crt-static -Zsanitizer=cfi #![crate_type="lib"] diff --git a/tests/codegen/sanitizer/cfi-emit-type-checks-attr-no-sanitize.rs b/tests/codegen/sanitizer/cfi-emit-type-checks-attr-no-sanitize.rs index a3cd16e3dd5a..9e0cc346afba 100644 --- a/tests/codegen/sanitizer/cfi-emit-type-checks-attr-no-sanitize.rs +++ b/tests/codegen/sanitizer/cfi-emit-type-checks-attr-no-sanitize.rs @@ -1,7 +1,7 @@ // Verifies that pointer type membership tests for indirect calls are omitted. // -// needs-sanitizer-cfi -// compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi -Copt-level=0 +//@ needs-sanitizer-cfi +//@ compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi -Copt-level=0 #![crate_type="lib"] #![feature(no_sanitize)] diff --git a/tests/codegen/sanitizer/cfi-emit-type-checks.rs b/tests/codegen/sanitizer/cfi-emit-type-checks.rs index f0fe5de9f66c..6ec6f0e5476d 100644 --- a/tests/codegen/sanitizer/cfi-emit-type-checks.rs +++ b/tests/codegen/sanitizer/cfi-emit-type-checks.rs @@ -1,7 +1,7 @@ // Verifies that pointer type membership tests for indirect calls are emitted. // -// needs-sanitizer-cfi -// compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi -Copt-level=0 +//@ needs-sanitizer-cfi +//@ compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi -Copt-level=0 #![crate_type="lib"] diff --git a/tests/codegen/sanitizer/cfi-emit-type-metadata-attr-cfi-encoding.rs b/tests/codegen/sanitizer/cfi-emit-type-metadata-attr-cfi-encoding.rs index f16890afad08..f15ca30b7e36 100644 --- a/tests/codegen/sanitizer/cfi-emit-type-metadata-attr-cfi-encoding.rs +++ b/tests/codegen/sanitizer/cfi-emit-type-metadata-attr-cfi-encoding.rs @@ -1,7 +1,7 @@ // Verifies that user-defined CFI encoding for types are emitted. // -// needs-sanitizer-cfi -// compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi -Copt-level=0 +//@ needs-sanitizer-cfi +//@ compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi -Copt-level=0 #![crate_type="lib"] #![feature(cfi_encoding, extern_types)] diff --git a/tests/codegen/sanitizer/cfi-emit-type-metadata-id-itanium-cxx-abi.rs b/tests/codegen/sanitizer/cfi-emit-type-metadata-id-itanium-cxx-abi.rs index 4ed7c27fc4e8..5f49909712f9 100644 --- a/tests/codegen/sanitizer/cfi-emit-type-metadata-id-itanium-cxx-abi.rs +++ b/tests/codegen/sanitizer/cfi-emit-type-metadata-id-itanium-cxx-abi.rs @@ -1,7 +1,7 @@ // Verifies that type metadata identifiers for functions are emitted correctly. // -// needs-sanitizer-cfi -// compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi -Copt-level=0 +//@ needs-sanitizer-cfi +//@ compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi -Copt-level=0 #![crate_type="lib"] #![allow(dead_code)] diff --git a/tests/codegen/sanitizer/cfi-emit-type-metadata-itanium-cxx-abi-generalized.rs b/tests/codegen/sanitizer/cfi-emit-type-metadata-itanium-cxx-abi-generalized.rs index d200ed9798a6..ccd7ee93ca1f 100644 --- a/tests/codegen/sanitizer/cfi-emit-type-metadata-itanium-cxx-abi-generalized.rs +++ b/tests/codegen/sanitizer/cfi-emit-type-metadata-itanium-cxx-abi-generalized.rs @@ -1,7 +1,7 @@ // Verifies that generalized type metadata for functions are emitted. // -// needs-sanitizer-cfi -// compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi -Zsanitizer-cfi-generalize-pointers +//@ needs-sanitizer-cfi +//@ compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi -Zsanitizer-cfi-generalize-pointers #![crate_type="lib"] diff --git a/tests/codegen/sanitizer/cfi-emit-type-metadata-itanium-cxx-abi-normalized-generalized.rs b/tests/codegen/sanitizer/cfi-emit-type-metadata-itanium-cxx-abi-normalized-generalized.rs index cdefec17a1c7..d41300341780 100644 --- a/tests/codegen/sanitizer/cfi-emit-type-metadata-itanium-cxx-abi-normalized-generalized.rs +++ b/tests/codegen/sanitizer/cfi-emit-type-metadata-itanium-cxx-abi-normalized-generalized.rs @@ -1,7 +1,7 @@ // Verifies that normalized and generalized type metadata for functions are emitted. // -// needs-sanitizer-cfi -// compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi -Zsanitizer-cfi-normalize-integers -Zsanitizer-cfi-generalize-pointers +//@ needs-sanitizer-cfi +//@ compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi -Zsanitizer-cfi-normalize-integers -Zsanitizer-cfi-generalize-pointers #![crate_type="lib"] diff --git a/tests/codegen/sanitizer/cfi-emit-type-metadata-itanium-cxx-abi-normalized.rs b/tests/codegen/sanitizer/cfi-emit-type-metadata-itanium-cxx-abi-normalized.rs index f360b33ddcf3..ac18379165de 100644 --- a/tests/codegen/sanitizer/cfi-emit-type-metadata-itanium-cxx-abi-normalized.rs +++ b/tests/codegen/sanitizer/cfi-emit-type-metadata-itanium-cxx-abi-normalized.rs @@ -1,7 +1,7 @@ // Verifies that normalized type metadata for functions are emitted. // -// needs-sanitizer-cfi -// compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi -Zsanitizer-cfi-normalize-integers +//@ needs-sanitizer-cfi +//@ compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi -Zsanitizer-cfi-normalize-integers #![crate_type="lib"] diff --git a/tests/codegen/sanitizer/cfi-emit-type-metadata-itanium-cxx-abi.rs b/tests/codegen/sanitizer/cfi-emit-type-metadata-itanium-cxx-abi.rs index 3cb817b212d1..526ba62c264d 100644 --- a/tests/codegen/sanitizer/cfi-emit-type-metadata-itanium-cxx-abi.rs +++ b/tests/codegen/sanitizer/cfi-emit-type-metadata-itanium-cxx-abi.rs @@ -1,7 +1,7 @@ // Verifies that type metadata for functions are emitted. // -// needs-sanitizer-cfi -// compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi +//@ needs-sanitizer-cfi +//@ compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi #![crate_type="lib"] diff --git a/tests/codegen/sanitizer/cfi-emit-type-metadata-trait-objects.rs b/tests/codegen/sanitizer/cfi-emit-type-metadata-trait-objects.rs index b69e57261a8e..318aad9291c4 100644 --- a/tests/codegen/sanitizer/cfi-emit-type-metadata-trait-objects.rs +++ b/tests/codegen/sanitizer/cfi-emit-type-metadata-trait-objects.rs @@ -1,7 +1,7 @@ // Verifies that type metadata identifiers for trait objects are emitted correctly. // -// needs-sanitizer-cfi -// compile-flags: -Clto -Cno-prepopulate-passes -Copt-level=0 -Ctarget-feature=-crt-static -Zsanitizer=cfi +//@ needs-sanitizer-cfi +//@ compile-flags: -Clto -Cno-prepopulate-passes -Copt-level=0 -Ctarget-feature=-crt-static -Zsanitizer=cfi #![crate_type="lib"] diff --git a/tests/codegen/sanitizer/cfi-generalize-pointers.rs b/tests/codegen/sanitizer/cfi-generalize-pointers.rs index 17cb42d3e74f..eaf3dad19092 100644 --- a/tests/codegen/sanitizer/cfi-generalize-pointers.rs +++ b/tests/codegen/sanitizer/cfi-generalize-pointers.rs @@ -1,7 +1,7 @@ // Verifies that pointer types are generalized. // -// needs-sanitizer-cfi -// compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi -Zsanitizer-cfi-generalize-pointers -Copt-level=0 +//@ needs-sanitizer-cfi +//@ compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi -Zsanitizer-cfi-generalize-pointers -Copt-level=0 #![crate_type="lib"] diff --git a/tests/codegen/sanitizer/cfi-normalize-integers.rs b/tests/codegen/sanitizer/cfi-normalize-integers.rs index d3cece4c7b6f..210814eb9ae1 100644 --- a/tests/codegen/sanitizer/cfi-normalize-integers.rs +++ b/tests/codegen/sanitizer/cfi-normalize-integers.rs @@ -1,7 +1,7 @@ // Verifies that integer types are normalized. // -// needs-sanitizer-cfi -// compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi -Zsanitizer-cfi-normalize-integers -Copt-level=0 +//@ needs-sanitizer-cfi +//@ compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi -Zsanitizer-cfi-normalize-integers -Copt-level=0 #![crate_type="lib"] diff --git a/tests/codegen/sanitizer/kasan-emits-instrumentation.rs b/tests/codegen/sanitizer/kasan-emits-instrumentation.rs index 18d315c9598b..56ee875286a2 100644 --- a/tests/codegen/sanitizer/kasan-emits-instrumentation.rs +++ b/tests/codegen/sanitizer/kasan-emits-instrumentation.rs @@ -1,15 +1,15 @@ // Verifies that `-Zsanitizer=kernel-address` emits sanitizer instrumentation. -// compile-flags: -Zsanitizer=kernel-address -Copt-level=0 -// revisions: aarch64 riscv64imac riscv64gc x86_64 -//[aarch64] compile-flags: --target aarch64-unknown-none -//[aarch64] needs-llvm-components: aarch64 -//[riscv64imac] compile-flags: --target riscv64imac-unknown-none-elf -//[riscv64imac] needs-llvm-components: riscv -//[riscv64gc] compile-flags: --target riscv64gc-unknown-none-elf -//[riscv64gc] needs-llvm-components: riscv -//[x86_64] compile-flags: --target x86_64-unknown-none -//[x86_64] needs-llvm-components: x86 +//@ compile-flags: -Zsanitizer=kernel-address -Copt-level=0 +//@ revisions: aarch64 riscv64imac riscv64gc x86_64 +//@[aarch64] compile-flags: --target aarch64-unknown-none +//@[aarch64] needs-llvm-components: aarch64 +//@[riscv64imac] compile-flags: --target riscv64imac-unknown-none-elf +//@[riscv64imac] needs-llvm-components: riscv +//@[riscv64gc] compile-flags: --target riscv64gc-unknown-none-elf +//@[riscv64gc] needs-llvm-components: riscv +//@[x86_64] compile-flags: --target x86_64-unknown-none +//@[x86_64] needs-llvm-components: x86 #![crate_type = "rlib"] #![feature(no_core, no_sanitize, lang_items)] diff --git a/tests/codegen/sanitizer/kcfi-add-kcfi-flag.rs b/tests/codegen/sanitizer/kcfi-add-kcfi-flag.rs index 6d466b93c406..7751d3baf79a 100644 --- a/tests/codegen/sanitizer/kcfi-add-kcfi-flag.rs +++ b/tests/codegen/sanitizer/kcfi-add-kcfi-flag.rs @@ -1,11 +1,11 @@ // Verifies that "kcfi" module flag is added. // -// revisions: aarch64 x86_64 -// [aarch64] compile-flags: --target aarch64-unknown-none -// [aarch64] needs-llvm-components: aarch64 -// [x86_64] compile-flags: --target x86_64-unknown-none -// [x86_64] needs-llvm-components: x86 -// compile-flags: -Ctarget-feature=-crt-static -Zsanitizer=kcfi +//@ revisions: aarch64 x86_64 +//@ [aarch64] compile-flags: --target aarch64-unknown-none +//@ [aarch64] needs-llvm-components: aarch64 +//@ [x86_64] compile-flags: --target x86_64-unknown-none +//@ [x86_64] needs-llvm-components: x86 +//@ compile-flags: -Ctarget-feature=-crt-static -Zsanitizer=kcfi #![feature(no_core, lang_items)] #![crate_type="lib"] diff --git a/tests/codegen/sanitizer/kcfi-emit-kcfi-operand-bundle-attr-no-sanitize.rs b/tests/codegen/sanitizer/kcfi-emit-kcfi-operand-bundle-attr-no-sanitize.rs index 001fc956aaaf..50e591ba06be 100644 --- a/tests/codegen/sanitizer/kcfi-emit-kcfi-operand-bundle-attr-no-sanitize.rs +++ b/tests/codegen/sanitizer/kcfi-emit-kcfi-operand-bundle-attr-no-sanitize.rs @@ -1,11 +1,11 @@ // Verifies that KCFI operand bundles are omitted. // -// revisions: aarch64 x86_64 -// [aarch64] compile-flags: --target aarch64-unknown-none -// [aarch64] needs-llvm-components: aarch64 -// [x86_64] compile-flags: --target x86_64-unknown-none -// [x86_64] needs-llvm-components: -// compile-flags: -Cno-prepopulate-passes -Zsanitizer=kcfi -Copt-level=0 +//@ revisions: aarch64 x86_64 +//@ [aarch64] compile-flags: --target aarch64-unknown-none +//@ [aarch64] needs-llvm-components: aarch64 +//@ [x86_64] compile-flags: --target x86_64-unknown-none +//@ [x86_64] needs-llvm-components: +//@ compile-flags: -Cno-prepopulate-passes -Zsanitizer=kcfi -Copt-level=0 #![crate_type="lib"] #![feature(no_core, no_sanitize, lang_items)] diff --git a/tests/codegen/sanitizer/kcfi-emit-kcfi-operand-bundle-itanium-cxx-abi-generalized.rs b/tests/codegen/sanitizer/kcfi-emit-kcfi-operand-bundle-itanium-cxx-abi-generalized.rs index 29e4df3511fb..bd1dfc4c413e 100644 --- a/tests/codegen/sanitizer/kcfi-emit-kcfi-operand-bundle-itanium-cxx-abi-generalized.rs +++ b/tests/codegen/sanitizer/kcfi-emit-kcfi-operand-bundle-itanium-cxx-abi-generalized.rs @@ -1,11 +1,11 @@ // Verifies that generalized KCFI type metadata for functions are emitted. // -// revisions: aarch64 x86_64 -// [aarch64] compile-flags: --target aarch64-unknown-none -// [aarch64] needs-llvm-components: aarch64 -// [x86_64] compile-flags: --target x86_64-unknown-none -// [x86_64] needs-llvm-components: -// compile-flags: -Cno-prepopulate-passes -Zsanitizer=kcfi -Zsanitizer-cfi-generalize-pointers +//@ revisions: aarch64 x86_64 +//@ [aarch64] compile-flags: --target aarch64-unknown-none +//@ [aarch64] needs-llvm-components: aarch64 +//@ [x86_64] compile-flags: --target x86_64-unknown-none +//@ [x86_64] needs-llvm-components: +//@ compile-flags: -Cno-prepopulate-passes -Zsanitizer=kcfi -Zsanitizer-cfi-generalize-pointers #![crate_type="lib"] #![feature(no_core, lang_items)] diff --git a/tests/codegen/sanitizer/kcfi-emit-kcfi-operand-bundle-itanium-cxx-abi-normalized-generalized.rs b/tests/codegen/sanitizer/kcfi-emit-kcfi-operand-bundle-itanium-cxx-abi-normalized-generalized.rs index 84d678a33ba9..b8275f44fac5 100644 --- a/tests/codegen/sanitizer/kcfi-emit-kcfi-operand-bundle-itanium-cxx-abi-normalized-generalized.rs +++ b/tests/codegen/sanitizer/kcfi-emit-kcfi-operand-bundle-itanium-cxx-abi-normalized-generalized.rs @@ -1,11 +1,11 @@ // Verifies that normalized and generalized KCFI type metadata for functions are emitted. // -// revisions: aarch64 x86_64 -// [aarch64] compile-flags: --target aarch64-unknown-none -// [aarch64] needs-llvm-components: aarch64 -// [x86_64] compile-flags: --target x86_64-unknown-none -// [x86_64] needs-llvm-components: -// compile-flags: -Cno-prepopulate-passes -Zsanitizer=kcfi -Zsanitizer-cfi-normalize-integers -Zsanitizer-cfi-generalize-pointers +//@ revisions: aarch64 x86_64 +//@ [aarch64] compile-flags: --target aarch64-unknown-none +//@ [aarch64] needs-llvm-components: aarch64 +//@ [x86_64] compile-flags: --target x86_64-unknown-none +//@ [x86_64] needs-llvm-components: +//@ compile-flags: -Cno-prepopulate-passes -Zsanitizer=kcfi -Zsanitizer-cfi-normalize-integers -Zsanitizer-cfi-generalize-pointers #![crate_type="lib"] #![feature(no_core, lang_items)] diff --git a/tests/codegen/sanitizer/kcfi-emit-kcfi-operand-bundle-itanium-cxx-abi-normalized.rs b/tests/codegen/sanitizer/kcfi-emit-kcfi-operand-bundle-itanium-cxx-abi-normalized.rs index 761c37a9e06a..cd1b0c5efb0a 100644 --- a/tests/codegen/sanitizer/kcfi-emit-kcfi-operand-bundle-itanium-cxx-abi-normalized.rs +++ b/tests/codegen/sanitizer/kcfi-emit-kcfi-operand-bundle-itanium-cxx-abi-normalized.rs @@ -1,11 +1,11 @@ // Verifies that normalized KCFI type metadata for functions are emitted. // -// revisions: aarch64 x86_64 -// [aarch64] compile-flags: --target aarch64-unknown-none -// [aarch64] needs-llvm-components: aarch64 -// [x86_64] compile-flags: --target x86_64-unknown-none -// [x86_64] needs-llvm-components: -// compile-flags: -Cno-prepopulate-passes -Zsanitizer=kcfi -Zsanitizer-cfi-normalize-integers +//@ revisions: aarch64 x86_64 +//@ [aarch64] compile-flags: --target aarch64-unknown-none +//@ [aarch64] needs-llvm-components: aarch64 +//@ [x86_64] compile-flags: --target x86_64-unknown-none +//@ [x86_64] needs-llvm-components: +//@ compile-flags: -Cno-prepopulate-passes -Zsanitizer=kcfi -Zsanitizer-cfi-normalize-integers #![crate_type="lib"] #![feature(no_core, lang_items)] diff --git a/tests/codegen/sanitizer/kcfi-emit-kcfi-operand-bundle-itanium-cxx-abi.rs b/tests/codegen/sanitizer/kcfi-emit-kcfi-operand-bundle-itanium-cxx-abi.rs index 83cda0ef136f..12690577da7a 100644 --- a/tests/codegen/sanitizer/kcfi-emit-kcfi-operand-bundle-itanium-cxx-abi.rs +++ b/tests/codegen/sanitizer/kcfi-emit-kcfi-operand-bundle-itanium-cxx-abi.rs @@ -1,11 +1,11 @@ // Verifies that KCFI type metadata for functions are emitted. // -// revisions: aarch64 x86_64 -// [aarch64] compile-flags: --target aarch64-unknown-none -// [aarch64] needs-llvm-components: aarch64 -// [x86_64] compile-flags: --target x86_64-unknown-none -// [x86_64] needs-llvm-components: -// compile-flags: -Cno-prepopulate-passes -Zsanitizer=kcfi -Copt-level=0 +//@ revisions: aarch64 x86_64 +//@ [aarch64] compile-flags: --target aarch64-unknown-none +//@ [aarch64] needs-llvm-components: aarch64 +//@ [x86_64] compile-flags: --target x86_64-unknown-none +//@ [x86_64] needs-llvm-components: +//@ compile-flags: -Cno-prepopulate-passes -Zsanitizer=kcfi -Copt-level=0 #![crate_type="lib"] #![feature(no_core, lang_items)] diff --git a/tests/codegen/sanitizer/kcfi-emit-kcfi-operand-bundle.rs b/tests/codegen/sanitizer/kcfi-emit-kcfi-operand-bundle.rs index e1d617b5ee18..f4b3e48638e4 100644 --- a/tests/codegen/sanitizer/kcfi-emit-kcfi-operand-bundle.rs +++ b/tests/codegen/sanitizer/kcfi-emit-kcfi-operand-bundle.rs @@ -1,11 +1,11 @@ // Verifies that KCFI operand bundles are emitted. // -// revisions: aarch64 x86_64 -// [aarch64] compile-flags: --target aarch64-unknown-none -// [aarch64] needs-llvm-components: aarch64 -// [x86_64] compile-flags: --target x86_64-unknown-none -// [x86_64] needs-llvm-components: -// compile-flags: -Cno-prepopulate-passes -Zsanitizer=kcfi -Copt-level=0 +//@ revisions: aarch64 x86_64 +//@ [aarch64] compile-flags: --target aarch64-unknown-none +//@ [aarch64] needs-llvm-components: aarch64 +//@ [x86_64] compile-flags: --target x86_64-unknown-none +//@ [x86_64] needs-llvm-components: +//@ compile-flags: -Cno-prepopulate-passes -Zsanitizer=kcfi -Copt-level=0 #![crate_type="lib"] #![feature(no_core, lang_items)] diff --git a/tests/codegen/sanitizer/kcfi-emit-type-metadata-trait-objects.rs b/tests/codegen/sanitizer/kcfi-emit-type-metadata-trait-objects.rs index 7aed137f215c..f08c9e6702ed 100644 --- a/tests/codegen/sanitizer/kcfi-emit-type-metadata-trait-objects.rs +++ b/tests/codegen/sanitizer/kcfi-emit-type-metadata-trait-objects.rs @@ -1,11 +1,11 @@ // Verifies that type metadata identifiers for trait objects are emitted correctly. // -// revisions: aarch64 x86_64 -// [aarch64] compile-flags: --target aarch64-unknown-none -// [aarch64] needs-llvm-components: aarch64 -// [x86_64] compile-flags: --target x86_64-unknown-none -// [x86_64] needs-llvm-components: -// compile-flags: -Cno-prepopulate-passes -Zsanitizer=kcfi -Copt-level=0 +//@ revisions: aarch64 x86_64 +//@ [aarch64] compile-flags: --target aarch64-unknown-none +//@ [aarch64] needs-llvm-components: aarch64 +//@ [x86_64] compile-flags: --target x86_64-unknown-none +//@ [x86_64] needs-llvm-components: +//@ compile-flags: -Cno-prepopulate-passes -Zsanitizer=kcfi -Copt-level=0 #![crate_type="lib"] #![feature(arbitrary_self_types, no_core, lang_items)] diff --git a/tests/codegen/sanitizer/memory-track-origins.rs b/tests/codegen/sanitizer/memory-track-origins.rs index e15a3b2274ee..956053ec42c7 100644 --- a/tests/codegen/sanitizer/memory-track-origins.rs +++ b/tests/codegen/sanitizer/memory-track-origins.rs @@ -1,15 +1,15 @@ // Verifies that MemorySanitizer track-origins level can be controlled // with -Zsanitizer-memory-track-origins option. // -// needs-sanitizer-memory -// revisions:MSAN-0 MSAN-1 MSAN-2 MSAN-1-LTO MSAN-2-LTO +//@ needs-sanitizer-memory +//@ revisions:MSAN-0 MSAN-1 MSAN-2 MSAN-1-LTO MSAN-2-LTO // -// compile-flags: -Zsanitizer=memory -Ctarget-feature=-crt-static -//[MSAN-0] compile-flags: -//[MSAN-1] compile-flags: -Zsanitizer-memory-track-origins=1 -//[MSAN-2] compile-flags: -Zsanitizer-memory-track-origins -//[MSAN-1-LTO] compile-flags: -Zsanitizer-memory-track-origins=1 -C lto=fat -//[MSAN-2-LTO] compile-flags: -Zsanitizer-memory-track-origins -C lto=fat +//@ compile-flags: -Zsanitizer=memory -Ctarget-feature=-crt-static +//@[MSAN-0] compile-flags: +//@[MSAN-1] compile-flags: -Zsanitizer-memory-track-origins=1 +//@[MSAN-2] compile-flags: -Zsanitizer-memory-track-origins +//@[MSAN-1-LTO] compile-flags: -Zsanitizer-memory-track-origins=1 -C lto=fat +//@[MSAN-2-LTO] compile-flags: -Zsanitizer-memory-track-origins -C lto=fat #![crate_type="lib"] diff --git a/tests/codegen/sanitizer/memtag-attr-check.rs b/tests/codegen/sanitizer/memtag-attr-check.rs index 3e5e14e84297..ffe3a2322a20 100644 --- a/tests/codegen/sanitizer/memtag-attr-check.rs +++ b/tests/codegen/sanitizer/memtag-attr-check.rs @@ -1,8 +1,8 @@ // This tests that the sanitize_memtag attribute is // applied when enabling the memtag sanitizer. // -// needs-sanitizer-memtag -// compile-flags: -Zsanitizer=memtag -Ctarget-feature=+mte -Copt-level=0 +//@ needs-sanitizer-memtag +//@ compile-flags: -Zsanitizer=memtag -Ctarget-feature=+mte -Copt-level=0 #![crate_type = "lib"] diff --git a/tests/codegen/sanitizer/no-sanitize-inlining.rs b/tests/codegen/sanitizer/no-sanitize-inlining.rs index e371b19eb366..623bfa608ca3 100644 --- a/tests/codegen/sanitizer/no-sanitize-inlining.rs +++ b/tests/codegen/sanitizer/no-sanitize-inlining.rs @@ -1,12 +1,12 @@ // Verifies that no_sanitize attribute prevents inlining when // given sanitizer is enabled, but has no effect on inlining otherwise. // -// needs-sanitizer-address -// needs-sanitizer-leak -// revisions: ASAN LSAN -// compile-flags: -Copt-level=3 -Zmir-opt-level=4 -Ctarget-feature=-crt-static -//[ASAN] compile-flags: -Zsanitizer=address -//[LSAN] compile-flags: -Zsanitizer=leak +//@ needs-sanitizer-address +//@ needs-sanitizer-leak +//@ revisions: ASAN LSAN +//@ compile-flags: -Copt-level=3 -Zmir-opt-level=4 -Ctarget-feature=-crt-static +//@[ASAN] compile-flags: -Zsanitizer=address +//@[LSAN] compile-flags: -Zsanitizer=leak #![crate_type="lib"] #![feature(no_sanitize)] diff --git a/tests/codegen/sanitizer/no-sanitize.rs b/tests/codegen/sanitizer/no-sanitize.rs index 029cf8e7f5c9..2614416210ff 100644 --- a/tests/codegen/sanitizer/no-sanitize.rs +++ b/tests/codegen/sanitizer/no-sanitize.rs @@ -1,8 +1,8 @@ // Verifies that no_sanitize attribute can be used to // selectively disable sanitizer instrumentation. // -// needs-sanitizer-address -// compile-flags: -Zsanitizer=address -Ctarget-feature=-crt-static -Copt-level=0 +//@ needs-sanitizer-address +//@ compile-flags: -Zsanitizer=address -Ctarget-feature=-crt-static -Copt-level=0 #![crate_type="lib"] #![feature(no_sanitize)] diff --git a/tests/codegen/sanitizer/safestack-attr-check.rs b/tests/codegen/sanitizer/safestack-attr-check.rs index b19e2d131334..050a60333afa 100644 --- a/tests/codegen/sanitizer/safestack-attr-check.rs +++ b/tests/codegen/sanitizer/safestack-attr-check.rs @@ -1,7 +1,7 @@ // This tests that the safestack attribute is applied when enabling the safe-stack sanitizer. // -// needs-sanitizer-safestack -// compile-flags: -Zsanitizer=safestack -Copt-level=0 +//@ needs-sanitizer-safestack +//@ compile-flags: -Zsanitizer=safestack -Copt-level=0 #![crate_type = "lib"] diff --git a/tests/codegen/sanitizer/sanitizer-recover.rs b/tests/codegen/sanitizer/sanitizer-recover.rs index 59b1fdd6494a..6b6593204818 100644 --- a/tests/codegen/sanitizer/sanitizer-recover.rs +++ b/tests/codegen/sanitizer/sanitizer-recover.rs @@ -1,17 +1,17 @@ // Verifies that AddressSanitizer and MemorySanitizer // recovery mode can be enabled with -Zsanitizer-recover. // -// needs-sanitizer-address -// needs-sanitizer-memory -// revisions:ASAN ASAN-RECOVER MSAN MSAN-RECOVER MSAN-RECOVER-LTO -// no-prefer-dynamic +//@ needs-sanitizer-address +//@ needs-sanitizer-memory +//@ revisions:ASAN ASAN-RECOVER MSAN MSAN-RECOVER MSAN-RECOVER-LTO +//@ no-prefer-dynamic // -// compile-flags: -Ctarget-feature=-crt-static -//[ASAN] compile-flags: -Zsanitizer=address -Copt-level=0 -//[ASAN-RECOVER] compile-flags: -Zsanitizer=address -Zsanitizer-recover=address -Copt-level=0 -//[MSAN] compile-flags: -Zsanitizer=memory -//[MSAN-RECOVER] compile-flags: -Zsanitizer=memory -Zsanitizer-recover=memory -//[MSAN-RECOVER-LTO] compile-flags: -Zsanitizer=memory -Zsanitizer-recover=memory -C lto=fat +//@ compile-flags: -Ctarget-feature=-crt-static +//@[ASAN] compile-flags: -Zsanitizer=address -Copt-level=0 +//@[ASAN-RECOVER] compile-flags: -Zsanitizer=address -Zsanitizer-recover=address -Copt-level=0 +//@[MSAN] compile-flags: -Zsanitizer=memory +//@[MSAN-RECOVER] compile-flags: -Zsanitizer=memory -Zsanitizer-recover=memory +//@[MSAN-RECOVER-LTO] compile-flags: -Zsanitizer=memory -Zsanitizer-recover=memory -C lto=fat // // MSAN-NOT: @__msan_keep_going // MSAN-RECOVER: @__msan_keep_going = weak_odr {{.*}}constant i32 1 diff --git a/tests/codegen/sanitizer/scs-attr-check.rs b/tests/codegen/sanitizer/scs-attr-check.rs index a885d911717f..6f4cbc2c0a6b 100644 --- a/tests/codegen/sanitizer/scs-attr-check.rs +++ b/tests/codegen/sanitizer/scs-attr-check.rs @@ -1,8 +1,8 @@ // This tests that the shadowcallstack attribute is // applied when enabling the shadow-call-stack sanitizer. // -// needs-sanitizer-shadow-call-stack -// compile-flags: -Zsanitizer=shadow-call-stack +//@ needs-sanitizer-shadow-call-stack +//@ compile-flags: -Zsanitizer=shadow-call-stack #![crate_type = "lib"] #![feature(no_sanitize)] diff --git a/tests/codegen/scalar-pair-bool.rs b/tests/codegen/scalar-pair-bool.rs index a8d16bc8f29f..fce0648e4507 100644 --- a/tests/codegen/scalar-pair-bool.rs +++ b/tests/codegen/scalar-pair-bool.rs @@ -1,4 +1,4 @@ -// compile-flags: -O +//@ compile-flags: -O #![crate_type = "lib"] diff --git a/tests/codegen/set-discriminant-invalid.rs b/tests/codegen/set-discriminant-invalid.rs index bccb9e4c7586..593da8cf80d0 100644 --- a/tests/codegen/set-discriminant-invalid.rs +++ b/tests/codegen/set-discriminant-invalid.rs @@ -1,4 +1,4 @@ -// compile-flags: -C opt-level=0 +//@ compile-flags: -C opt-level=0 #![crate_type = "lib"] pub enum ApiError {} diff --git a/tests/codegen/simd-intrinsic/simd-intrinsic-float-abs.rs b/tests/codegen/simd-intrinsic/simd-intrinsic-float-abs.rs index e7bb2327a6e0..3eb1c9d40515 100644 --- a/tests/codegen/simd-intrinsic/simd-intrinsic-float-abs.rs +++ b/tests/codegen/simd-intrinsic/simd-intrinsic-float-abs.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes +//@ compile-flags: -C no-prepopulate-passes #![crate_type = "lib"] diff --git a/tests/codegen/simd-intrinsic/simd-intrinsic-float-ceil.rs b/tests/codegen/simd-intrinsic/simd-intrinsic-float-ceil.rs index e33482d75562..05c2c0f6d044 100644 --- a/tests/codegen/simd-intrinsic/simd-intrinsic-float-ceil.rs +++ b/tests/codegen/simd-intrinsic/simd-intrinsic-float-ceil.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes +//@ compile-flags: -C no-prepopulate-passes #![crate_type = "lib"] diff --git a/tests/codegen/simd-intrinsic/simd-intrinsic-float-cos.rs b/tests/codegen/simd-intrinsic/simd-intrinsic-float-cos.rs index 0f52952bc0c9..8b51e76a515c 100644 --- a/tests/codegen/simd-intrinsic/simd-intrinsic-float-cos.rs +++ b/tests/codegen/simd-intrinsic/simd-intrinsic-float-cos.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes +//@ compile-flags: -C no-prepopulate-passes #![crate_type = "lib"] diff --git a/tests/codegen/simd-intrinsic/simd-intrinsic-float-exp.rs b/tests/codegen/simd-intrinsic/simd-intrinsic-float-exp.rs index 1154acf6924a..370bacdaee98 100644 --- a/tests/codegen/simd-intrinsic/simd-intrinsic-float-exp.rs +++ b/tests/codegen/simd-intrinsic/simd-intrinsic-float-exp.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes +//@ compile-flags: -C no-prepopulate-passes #![crate_type = "lib"] diff --git a/tests/codegen/simd-intrinsic/simd-intrinsic-float-exp2.rs b/tests/codegen/simd-intrinsic/simd-intrinsic-float-exp2.rs index 929dc9ac8dfe..888ec6ec42cf 100644 --- a/tests/codegen/simd-intrinsic/simd-intrinsic-float-exp2.rs +++ b/tests/codegen/simd-intrinsic/simd-intrinsic-float-exp2.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes +//@ compile-flags: -C no-prepopulate-passes #![crate_type = "lib"] diff --git a/tests/codegen/simd-intrinsic/simd-intrinsic-float-floor.rs b/tests/codegen/simd-intrinsic/simd-intrinsic-float-floor.rs index 56ca644f6bd9..b15d89a15b27 100644 --- a/tests/codegen/simd-intrinsic/simd-intrinsic-float-floor.rs +++ b/tests/codegen/simd-intrinsic/simd-intrinsic-float-floor.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes +//@ compile-flags: -C no-prepopulate-passes #![crate_type = "lib"] diff --git a/tests/codegen/simd-intrinsic/simd-intrinsic-float-fma.rs b/tests/codegen/simd-intrinsic/simd-intrinsic-float-fma.rs index fd65cb72baa4..16017526c34a 100644 --- a/tests/codegen/simd-intrinsic/simd-intrinsic-float-fma.rs +++ b/tests/codegen/simd-intrinsic/simd-intrinsic-float-fma.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes +//@ compile-flags: -C no-prepopulate-passes #![crate_type = "lib"] diff --git a/tests/codegen/simd-intrinsic/simd-intrinsic-float-fsqrt.rs b/tests/codegen/simd-intrinsic/simd-intrinsic-float-fsqrt.rs index adc1919256e7..9e0f7edd62b7 100644 --- a/tests/codegen/simd-intrinsic/simd-intrinsic-float-fsqrt.rs +++ b/tests/codegen/simd-intrinsic/simd-intrinsic-float-fsqrt.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes +//@ compile-flags: -C no-prepopulate-passes #![crate_type = "lib"] diff --git a/tests/codegen/simd-intrinsic/simd-intrinsic-float-log.rs b/tests/codegen/simd-intrinsic/simd-intrinsic-float-log.rs index c072519c0d65..0324411c91bd 100644 --- a/tests/codegen/simd-intrinsic/simd-intrinsic-float-log.rs +++ b/tests/codegen/simd-intrinsic/simd-intrinsic-float-log.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes +//@ compile-flags: -C no-prepopulate-passes #![crate_type = "lib"] diff --git a/tests/codegen/simd-intrinsic/simd-intrinsic-float-log10.rs b/tests/codegen/simd-intrinsic/simd-intrinsic-float-log10.rs index 5fd648995078..e7e2b0838cc2 100644 --- a/tests/codegen/simd-intrinsic/simd-intrinsic-float-log10.rs +++ b/tests/codegen/simd-intrinsic/simd-intrinsic-float-log10.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes +//@ compile-flags: -C no-prepopulate-passes #![crate_type = "lib"] diff --git a/tests/codegen/simd-intrinsic/simd-intrinsic-float-log2.rs b/tests/codegen/simd-intrinsic/simd-intrinsic-float-log2.rs index 35175f0ca572..912e15c6a1d8 100644 --- a/tests/codegen/simd-intrinsic/simd-intrinsic-float-log2.rs +++ b/tests/codegen/simd-intrinsic/simd-intrinsic-float-log2.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes +//@ compile-flags: -C no-prepopulate-passes #![crate_type = "lib"] diff --git a/tests/codegen/simd-intrinsic/simd-intrinsic-float-minmax.rs b/tests/codegen/simd-intrinsic/simd-intrinsic-float-minmax.rs index 4e0abed78cd6..ad297952916c 100644 --- a/tests/codegen/simd-intrinsic/simd-intrinsic-float-minmax.rs +++ b/tests/codegen/simd-intrinsic/simd-intrinsic-float-minmax.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes +//@ compile-flags: -C no-prepopulate-passes #![crate_type = "lib"] diff --git a/tests/codegen/simd-intrinsic/simd-intrinsic-float-pow.rs b/tests/codegen/simd-intrinsic/simd-intrinsic-float-pow.rs index 3b8d611ab675..1ae983ca20b8 100644 --- a/tests/codegen/simd-intrinsic/simd-intrinsic-float-pow.rs +++ b/tests/codegen/simd-intrinsic/simd-intrinsic-float-pow.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes +//@ compile-flags: -C no-prepopulate-passes #![crate_type = "lib"] diff --git a/tests/codegen/simd-intrinsic/simd-intrinsic-float-powi.rs b/tests/codegen/simd-intrinsic/simd-intrinsic-float-powi.rs index e80c50c10767..638b78b2d72a 100644 --- a/tests/codegen/simd-intrinsic/simd-intrinsic-float-powi.rs +++ b/tests/codegen/simd-intrinsic/simd-intrinsic-float-powi.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes +//@ compile-flags: -C no-prepopulate-passes #![crate_type = "lib"] diff --git a/tests/codegen/simd-intrinsic/simd-intrinsic-float-sin.rs b/tests/codegen/simd-intrinsic/simd-intrinsic-float-sin.rs index 9e3fab49aff6..c0caedb74987 100644 --- a/tests/codegen/simd-intrinsic/simd-intrinsic-float-sin.rs +++ b/tests/codegen/simd-intrinsic/simd-intrinsic-float-sin.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes +//@ compile-flags: -C no-prepopulate-passes #![crate_type = "lib"] diff --git a/tests/codegen/simd-intrinsic/simd-intrinsic-generic-arithmetic-saturating.rs b/tests/codegen/simd-intrinsic/simd-intrinsic-generic-arithmetic-saturating.rs index 0bcfacec6d79..1426b439c443 100644 --- a/tests/codegen/simd-intrinsic/simd-intrinsic-generic-arithmetic-saturating.rs +++ b/tests/codegen/simd-intrinsic/simd-intrinsic-generic-arithmetic-saturating.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes +//@ compile-flags: -C no-prepopulate-passes // #![crate_type = "lib"] diff --git a/tests/codegen/simd-intrinsic/simd-intrinsic-generic-bitmask.rs b/tests/codegen/simd-intrinsic/simd-intrinsic-generic-bitmask.rs index ea24569bd10c..43012dece622 100644 --- a/tests/codegen/simd-intrinsic/simd-intrinsic-generic-bitmask.rs +++ b/tests/codegen/simd-intrinsic/simd-intrinsic-generic-bitmask.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes +//@ compile-flags: -C no-prepopulate-passes // #![crate_type = "lib"] diff --git a/tests/codegen/simd-intrinsic/simd-intrinsic-generic-gather.rs b/tests/codegen/simd-intrinsic/simd-intrinsic-generic-gather.rs index 0bb21019685e..29d9e4018e0d 100644 --- a/tests/codegen/simd-intrinsic/simd-intrinsic-generic-gather.rs +++ b/tests/codegen/simd-intrinsic/simd-intrinsic-generic-gather.rs @@ -1,6 +1,6 @@ // -// compile-flags: -C no-prepopulate-passes +//@ compile-flags: -C no-prepopulate-passes #![crate_type = "lib"] diff --git a/tests/codegen/simd-intrinsic/simd-intrinsic-generic-masked-load.rs b/tests/codegen/simd-intrinsic/simd-intrinsic-generic-masked-load.rs index e573b7d21bd2..7c48f7d5120e 100644 --- a/tests/codegen/simd-intrinsic/simd-intrinsic-generic-masked-load.rs +++ b/tests/codegen/simd-intrinsic/simd-intrinsic-generic-masked-load.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes +//@ compile-flags: -C no-prepopulate-passes #![crate_type = "lib"] diff --git a/tests/codegen/simd-intrinsic/simd-intrinsic-generic-masked-store.rs b/tests/codegen/simd-intrinsic/simd-intrinsic-generic-masked-store.rs index 91656622216d..366592ba3f1e 100644 --- a/tests/codegen/simd-intrinsic/simd-intrinsic-generic-masked-store.rs +++ b/tests/codegen/simd-intrinsic/simd-intrinsic-generic-masked-store.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes +//@ compile-flags: -C no-prepopulate-passes #![crate_type = "lib"] diff --git a/tests/codegen/simd-intrinsic/simd-intrinsic-generic-scatter.rs b/tests/codegen/simd-intrinsic/simd-intrinsic-generic-scatter.rs index 51953560b4fd..ccfedb31dc57 100644 --- a/tests/codegen/simd-intrinsic/simd-intrinsic-generic-scatter.rs +++ b/tests/codegen/simd-intrinsic/simd-intrinsic-generic-scatter.rs @@ -1,6 +1,6 @@ // -// compile-flags: -C no-prepopulate-passes +//@ compile-flags: -C no-prepopulate-passes #![crate_type = "lib"] diff --git a/tests/codegen/simd-intrinsic/simd-intrinsic-generic-select.rs b/tests/codegen/simd-intrinsic/simd-intrinsic-generic-select.rs index 03bb22655264..903bd3f4dc60 100644 --- a/tests/codegen/simd-intrinsic/simd-intrinsic-generic-select.rs +++ b/tests/codegen/simd-intrinsic/simd-intrinsic-generic-select.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes +//@ compile-flags: -C no-prepopulate-passes #![crate_type = "lib"] diff --git a/tests/codegen/simd-intrinsic/simd-intrinsic-transmute-array.rs b/tests/codegen/simd-intrinsic/simd-intrinsic-transmute-array.rs index eb4ce307e70f..c92ae4163ae5 100644 --- a/tests/codegen/simd-intrinsic/simd-intrinsic-transmute-array.rs +++ b/tests/codegen/simd-intrinsic/simd-intrinsic-transmute-array.rs @@ -1,5 +1,5 @@ // -// compile-flags: -C no-prepopulate-passes +//@ compile-flags: -C no-prepopulate-passes #![crate_type = "lib"] #![allow(non_camel_case_types)] diff --git a/tests/codegen/simd/issue-120720-reduce-nan.rs b/tests/codegen/simd/issue-120720-reduce-nan.rs index c2ffca4bd878..2c6098c04891 100644 --- a/tests/codegen/simd/issue-120720-reduce-nan.rs +++ b/tests/codegen/simd/issue-120720-reduce-nan.rs @@ -1,5 +1,5 @@ -// compile-flags: -C opt-level=3 -C target-cpu=cannonlake -// only-x86_64 +//@ compile-flags: -C opt-level=3 -C target-cpu=cannonlake +//@ only-x86_64 // In a previous implementation, _mm512_reduce_add_pd did the reduction with all fast-math flags // enabled, making it UB to reduce a vector containing a NaN. diff --git a/tests/codegen/simd/simd-wide-sum.rs b/tests/codegen/simd/simd-wide-sum.rs index 109d53813438..010500139e59 100644 --- a/tests/codegen/simd/simd-wide-sum.rs +++ b/tests/codegen/simd/simd-wide-sum.rs @@ -1,9 +1,9 @@ -// revisions: llvm mir-opt3 -// compile-flags: -C opt-level=3 -Z merge-functions=disabled --edition=2021 -// only-x86_64 -// ignore-debug: the debug assertions get in the way -// [mir-opt3]compile-flags: -Zmir-opt-level=3 -// [mir-opt3]build-pass +//@ revisions: llvm mir-opt3 +//@ compile-flags: -C opt-level=3 -Z merge-functions=disabled --edition=2021 +//@ only-x86_64 +//@ ignore-debug: the debug assertions get in the way +//@ [mir-opt3]compile-flags: -Zmir-opt-level=3 +//@ [mir-opt3]build-pass // mir-opt3 is a regression test for https://github.com/rust-lang/rust/issues/98016 diff --git a/tests/codegen/simd/simd_arith_offset.rs b/tests/codegen/simd/simd_arith_offset.rs index 1ee73de1186f..9f1ef27053e6 100644 --- a/tests/codegen/simd/simd_arith_offset.rs +++ b/tests/codegen/simd/simd_arith_offset.rs @@ -1,5 +1,5 @@ -// compile-flags: -C no-prepopulate-passes -// only-64bit (because the LLVM type of i64 for usize shows up) +//@ compile-flags: -C no-prepopulate-passes +//@ only-64bit (because the LLVM type of i64 for usize shows up) // #![crate_type = "lib"] diff --git a/tests/codegen/simd/swap-simd-types.rs b/tests/codegen/simd/swap-simd-types.rs index 3472a42b0e65..e03e2d4ff8df 100644 --- a/tests/codegen/simd/swap-simd-types.rs +++ b/tests/codegen/simd/swap-simd-types.rs @@ -1,6 +1,6 @@ -// compile-flags: -O -C target-feature=+avx -// only-x86_64 -// ignore-debug: the debug assertions get in the way +//@ compile-flags: -O -C target-feature=+avx +//@ only-x86_64 +//@ ignore-debug: the debug assertions get in the way #![crate_type = "lib"] diff --git a/tests/codegen/slice-as_chunks.rs b/tests/codegen/slice-as_chunks.rs index e832f90d07a5..c9cd482a9a4e 100644 --- a/tests/codegen/slice-as_chunks.rs +++ b/tests/codegen/slice-as_chunks.rs @@ -1,6 +1,6 @@ -// compile-flags: -O -// only-64bit (because the LLVM type of i64 for usize shows up) -// ignore-debug: the debug assertions get in the way +//@ compile-flags: -O +//@ only-64bit (because the LLVM type of i64 for usize shows up) +//@ ignore-debug: the debug assertions get in the way #![crate_type = "lib"] #![feature(slice_as_chunks)] diff --git a/tests/codegen/slice-indexing.rs b/tests/codegen/slice-indexing.rs index c40d59fb0cf0..52714a76a8dd 100644 --- a/tests/codegen/slice-indexing.rs +++ b/tests/codegen/slice-indexing.rs @@ -1,6 +1,6 @@ -// compile-flags: -O -// only-64bit (because the LLVM type of i64 for usize shows up) -// ignore-debug: the debug assertions get in the way +//@ compile-flags: -O +//@ only-64bit (because the LLVM type of i64 for usize shows up) +//@ ignore-debug: the debug assertions get in the way #![crate_type = "lib"] diff --git a/tests/codegen/slice-init.rs b/tests/codegen/slice-init.rs index c0bf1a04119b..8126bf84618a 100644 --- a/tests/codegen/slice-init.rs +++ b/tests/codegen/slice-init.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes +//@ compile-flags: -C no-prepopulate-passes #![crate_type = "lib"] diff --git a/tests/codegen/slice-iter-fold.rs b/tests/codegen/slice-iter-fold.rs index a55425cb6bbc..5a9d789b9846 100644 --- a/tests/codegen/slice-iter-fold.rs +++ b/tests/codegen/slice-iter-fold.rs @@ -1,5 +1,5 @@ -// ignore-debug: the debug assertions get in the way -// compile-flags: -O +//@ ignore-debug: the debug assertions get in the way +//@ compile-flags: -O #![crate_type = "lib"] // CHECK-LABEL: @slice_fold_to_last diff --git a/tests/codegen/slice-iter-len-eq-zero.rs b/tests/codegen/slice-iter-len-eq-zero.rs index 77febf5170da..43c64511e527 100644 --- a/tests/codegen/slice-iter-len-eq-zero.rs +++ b/tests/codegen/slice-iter-len-eq-zero.rs @@ -1,5 +1,5 @@ -// compile-flags: -O -// ignore-debug: the debug assertions add extra comparisons +//@ compile-flags: -O +//@ ignore-debug: the debug assertions add extra comparisons #![crate_type = "lib"] type Demo = [u8; 3]; diff --git a/tests/codegen/slice-iter-nonnull.rs b/tests/codegen/slice-iter-nonnull.rs index 93c8828ccd33..c82ae3b61b41 100644 --- a/tests/codegen/slice-iter-nonnull.rs +++ b/tests/codegen/slice-iter-nonnull.rs @@ -1,5 +1,5 @@ -// compile-flags: -O -// ignore-debug (these add extra checks that make it hard to verify) +//@ compile-flags: -O +//@ ignore-debug (these add extra checks that make it hard to verify) #![crate_type = "lib"] #![feature(exact_size_is_empty)] diff --git a/tests/codegen/slice-position-bounds-check.rs b/tests/codegen/slice-position-bounds-check.rs index 57904e5e4999..301895883ee3 100644 --- a/tests/codegen/slice-position-bounds-check.rs +++ b/tests/codegen/slice-position-bounds-check.rs @@ -1,4 +1,4 @@ -// compile-flags: -O -C panic=abort +//@ compile-flags: -O -C panic=abort #![crate_type = "lib"] fn search(arr: &mut [T], a: &T) -> Result { diff --git a/tests/codegen/slice-ref-equality.rs b/tests/codegen/slice-ref-equality.rs index afbdf66ce0aa..d34aecd1903a 100644 --- a/tests/codegen/slice-ref-equality.rs +++ b/tests/codegen/slice-ref-equality.rs @@ -1,5 +1,5 @@ -// compile-flags: -O -Zmerge-functions=disabled -// ignore-debug (the extra assertions get in the way) +//@ compile-flags: -O -Zmerge-functions=disabled +//@ ignore-debug (the extra assertions get in the way) #![crate_type = "lib"] diff --git a/tests/codegen/slice-reverse.rs b/tests/codegen/slice-reverse.rs index e50b22f3ac40..40bc89bc9d0c 100644 --- a/tests/codegen/slice-reverse.rs +++ b/tests/codegen/slice-reverse.rs @@ -1,6 +1,6 @@ -// compile-flags: -O -// only-x86_64 -// ignore-debug: the debug assertions in from_raw_parts get in the way +//@ compile-flags: -O +//@ only-x86_64 +//@ ignore-debug: the debug assertions in from_raw_parts get in the way #![crate_type = "lib"] diff --git a/tests/codegen/slice-windows-no-bounds-check.rs b/tests/codegen/slice-windows-no-bounds-check.rs index 4f5f4425c271..188011ebe7fd 100644 --- a/tests/codegen/slice-windows-no-bounds-check.rs +++ b/tests/codegen/slice-windows-no-bounds-check.rs @@ -1,6 +1,6 @@ #![crate_type = "lib"] -// compile-flags: -O +//@ compile-flags: -O use std::slice::Windows; diff --git a/tests/codegen/slice_as_from_ptr_range.rs b/tests/codegen/slice_as_from_ptr_range.rs index 3d8ab0a4b5f8..cc811e8f5894 100644 --- a/tests/codegen/slice_as_from_ptr_range.rs +++ b/tests/codegen/slice_as_from_ptr_range.rs @@ -1,6 +1,6 @@ -// compile-flags: -O -// only-64bit (because we're using [ui]size) -// ignore-debug (because the assertions get in the way) +//@ compile-flags: -O +//@ only-64bit (because we're using [ui]size) +//@ ignore-debug (because the assertions get in the way) #![crate_type = "lib"] #![feature(slice_from_ptr_range)] diff --git a/tests/codegen/some-abis-do-extend-params-to-32-bits.rs b/tests/codegen/some-abis-do-extend-params-to-32-bits.rs index 9f2d9d06524f..a75a239e2ab8 100644 --- a/tests/codegen/some-abis-do-extend-params-to-32-bits.rs +++ b/tests/codegen/some-abis-do-extend-params-to-32-bits.rs @@ -1,21 +1,21 @@ -// compile-flags: -Cno-prepopulate-passes -Copt-level=0 +//@ compile-flags: -Cno-prepopulate-passes -Copt-level=0 -// revisions:x86_64 i686 aarch64-apple aarch64-windows aarch64-linux arm riscv +//@ revisions:x86_64 i686 aarch64-apple aarch64-windows aarch64-linux arm riscv -//[x86_64] compile-flags: --target x86_64-unknown-uefi -//[x86_64] needs-llvm-components: x86 -//[i686] compile-flags: --target i686-unknown-linux-musl -//[i686] needs-llvm-components: x86 -//[aarch64-windows] compile-flags: --target aarch64-pc-windows-msvc -//[aarch64-windows] needs-llvm-components: aarch64 -//[aarch64-linux] compile-flags: --target aarch64-unknown-linux-gnu -//[aarch64-linux] needs-llvm-components: aarch64 -//[aarch64-apple] compile-flags: --target aarch64-apple-darwin -//[aarch64-apple] needs-llvm-components: aarch64 -//[arm] compile-flags: --target armv7r-none-eabi -//[arm] needs-llvm-components: arm -//[riscv] compile-flags: --target riscv64gc-unknown-none-elf -//[riscv] needs-llvm-components: riscv +//@[x86_64] compile-flags: --target x86_64-unknown-uefi +//@[x86_64] needs-llvm-components: x86 +//@[i686] compile-flags: --target i686-unknown-linux-musl +//@[i686] needs-llvm-components: x86 +//@[aarch64-windows] compile-flags: --target aarch64-pc-windows-msvc +//@[aarch64-windows] needs-llvm-components: aarch64 +//@[aarch64-linux] compile-flags: --target aarch64-unknown-linux-gnu +//@[aarch64-linux] needs-llvm-components: aarch64 +//@[aarch64-apple] compile-flags: --target aarch64-apple-darwin +//@[aarch64-apple] needs-llvm-components: aarch64 +//@[arm] compile-flags: --target armv7r-none-eabi +//@[arm] needs-llvm-components: arm +//@[riscv] compile-flags: --target riscv64gc-unknown-none-elf +//@[riscv] needs-llvm-components: riscv // See bottom of file for a corresponding C source file that is meant to yield // equivalent declarations. diff --git a/tests/codegen/some-global-nonnull.rs b/tests/codegen/some-global-nonnull.rs index 59c47de4129c..8e9308a72658 100644 --- a/tests/codegen/some-global-nonnull.rs +++ b/tests/codegen/some-global-nonnull.rs @@ -1,4 +1,4 @@ -// compile-flags: -O +//@ compile-flags: -O #![crate_type = "lib"] diff --git a/tests/codegen/sparc-struct-abi.rs b/tests/codegen/sparc-struct-abi.rs index b94ef79aec7f..0850e9e15eaf 100644 --- a/tests/codegen/sparc-struct-abi.rs +++ b/tests/codegen/sparc-struct-abi.rs @@ -1,8 +1,8 @@ // Checks that we correctly codegen extern "C" functions returning structs. // See issues #52638 and #86163. -// compile-flags: -O --target=sparc64-unknown-linux-gnu --crate-type=rlib -// needs-llvm-components: sparc +//@ compile-flags: -O --target=sparc64-unknown-linux-gnu --crate-type=rlib +//@ needs-llvm-components: sparc #![feature(no_core, lang_items)] #![no_core] diff --git a/tests/codegen/split-lto-unit.rs b/tests/codegen/split-lto-unit.rs index dc6570be32b4..6cea9a2d8d5f 100644 --- a/tests/codegen/split-lto-unit.rs +++ b/tests/codegen/split-lto-unit.rs @@ -1,7 +1,7 @@ // Verifies that "EnableSplitLTOUnit" module flag is added. // -// needs-sanitizer-cfi -// compile-flags: -Clto -Ctarget-feature=-crt-static -Zsplit-lto-unit +//@ needs-sanitizer-cfi +//@ compile-flags: -Clto -Ctarget-feature=-crt-static -Zsplit-lto-unit #![crate_type="lib"] diff --git a/tests/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs b/tests/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs index 6ef0f0406d20..7aec8d545dcf 100644 --- a/tests/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs +++ b/tests/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs @@ -1,4 +1,4 @@ -// compile-flags: -g -Z src-hash-algorithm=md5 -Copt-level=0 +//@ compile-flags: -g -Z src-hash-algorithm=md5 -Copt-level=0 #![crate_type = "lib"] diff --git a/tests/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs b/tests/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs index ebfa3040acaf..5389c32f938f 100644 --- a/tests/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs +++ b/tests/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs @@ -1,4 +1,4 @@ -// compile-flags: -g -Z src-hash-algorithm=sha1 -Copt-level=0 +//@ compile-flags: -g -Z src-hash-algorithm=sha1 -Copt-level=0 #![crate_type = "lib"] diff --git a/tests/codegen/src-hash-algorithm/src-hash-algorithm-sha256.rs b/tests/codegen/src-hash-algorithm/src-hash-algorithm-sha256.rs index 5ec678d55f34..520890c47f10 100644 --- a/tests/codegen/src-hash-algorithm/src-hash-algorithm-sha256.rs +++ b/tests/codegen/src-hash-algorithm/src-hash-algorithm-sha256.rs @@ -1,4 +1,4 @@ -// compile-flags: -g -Z src-hash-algorithm=sha256 -Copt-level=0 +//@ compile-flags: -g -Z src-hash-algorithm=sha256 -Copt-level=0 #![crate_type = "lib"] diff --git a/tests/codegen/sroa-fragment-debuginfo.rs b/tests/codegen/sroa-fragment-debuginfo.rs index fb10f63beaf4..d8c2d2c6f9ef 100644 --- a/tests/codegen/sroa-fragment-debuginfo.rs +++ b/tests/codegen/sroa-fragment-debuginfo.rs @@ -1,8 +1,8 @@ -// compile-flags: -g -Zmir-opt-level=0 -Zmir-enable-passes=+ScalarReplacementOfAggregates -// compile-flags: -Cno-prepopulate-passes +//@ compile-flags: -g -Zmir-opt-level=0 -Zmir-enable-passes=+ScalarReplacementOfAggregates +//@ compile-flags: -Cno-prepopulate-passes // // Tested offsets are only correct for x86_64. -// only-x86_64 +//@ only-x86_64 #![crate_type = "lib"] diff --git a/tests/codegen/sse42-implies-crc32.rs b/tests/codegen/sse42-implies-crc32.rs index 56079d32a8d8..c627be5c30e9 100644 --- a/tests/codegen/sse42-implies-crc32.rs +++ b/tests/codegen/sse42-implies-crc32.rs @@ -1,5 +1,5 @@ -// only-x86_64 -// compile-flags: -Copt-level=3 +//@ only-x86_64 +//@ compile-flags: -Copt-level=3 #![crate_type = "lib"] diff --git a/tests/codegen/stack-probes-inline.rs b/tests/codegen/stack-probes-inline.rs index 34027e918509..6bd6b0cb354c 100644 --- a/tests/codegen/stack-probes-inline.rs +++ b/tests/codegen/stack-probes-inline.rs @@ -1,22 +1,22 @@ // Check the "probe-stack" attribute for targets with `StackProbeType::Inline`, // or `StackProbeType::InlineOrCall` when running on newer LLVM. -// compile-flags: -C no-prepopulate-passes -// revisions: aarch64 powerpc powerpc64 powerpc64le s390x i686 x86_64 -//[aarch64] compile-flags: --target aarch64-unknown-linux-gnu -//[aarch64] needs-llvm-components: aarch64 -//[powerpc] compile-flags: --target powerpc-unknown-linux-gnu -//[powerpc] needs-llvm-components: powerpc -//[powerpc64] compile-flags: --target powerpc64-unknown-linux-gnu -//[powerpc64] needs-llvm-components: powerpc -//[powerpc64le] compile-flags: --target powerpc64le-unknown-linux-gnu -//[powerpc64le] needs-llvm-components: powerpc -//[s390x] compile-flags: --target s390x-unknown-linux-gnu -//[s390x] needs-llvm-components: systemz -//[i686] compile-flags: --target i686-unknown-linux-gnu -//[i686] needs-llvm-components: x86 -//[x86_64] compile-flags: --target x86_64-unknown-linux-gnu -//[x86_64] needs-llvm-components: x86 +//@ compile-flags: -C no-prepopulate-passes +//@ revisions: aarch64 powerpc powerpc64 powerpc64le s390x i686 x86_64 +//@[aarch64] compile-flags: --target aarch64-unknown-linux-gnu +//@[aarch64] needs-llvm-components: aarch64 +//@[powerpc] compile-flags: --target powerpc-unknown-linux-gnu +//@[powerpc] needs-llvm-components: powerpc +//@[powerpc64] compile-flags: --target powerpc64-unknown-linux-gnu +//@[powerpc64] needs-llvm-components: powerpc +//@[powerpc64le] compile-flags: --target powerpc64le-unknown-linux-gnu +//@[powerpc64le] needs-llvm-components: powerpc +//@[s390x] compile-flags: --target s390x-unknown-linux-gnu +//@[s390x] needs-llvm-components: systemz +//@[i686] compile-flags: --target i686-unknown-linux-gnu +//@[i686] needs-llvm-components: x86 +//@[x86_64] compile-flags: --target x86_64-unknown-linux-gnu +//@[x86_64] needs-llvm-components: x86 #![crate_type = "rlib"] #![feature(no_core, lang_items)] diff --git a/tests/codegen/stack-protector.rs b/tests/codegen/stack-protector.rs index a680789af15f..8ab25b470cda 100644 --- a/tests/codegen/stack-protector.rs +++ b/tests/codegen/stack-protector.rs @@ -1,8 +1,8 @@ -// revisions: all strong basic none -// ignore-nvptx64 stack protector not supported -// [all] compile-flags: -Z stack-protector=all -// [strong] compile-flags: -Z stack-protector=strong -// [basic] compile-flags: -Z stack-protector=basic +//@ revisions: all strong basic none +//@ ignore-nvptx64 stack protector not supported +//@ [all] compile-flags: -Z stack-protector=all +//@ [strong] compile-flags: -Z stack-protector=strong +//@ [basic] compile-flags: -Z stack-protector=basic #![crate_type = "lib"] diff --git a/tests/codegen/static-relocation-model-msvc.rs b/tests/codegen/static-relocation-model-msvc.rs index 735ef7081c95..5501827498cc 100644 --- a/tests/codegen/static-relocation-model-msvc.rs +++ b/tests/codegen/static-relocation-model-msvc.rs @@ -1,8 +1,8 @@ // Verify linkage of external symbols in the static relocation model on MSVC. // -// compile-flags: -O -C relocation-model=static -// aux-build: extern_decl.rs -// only-x86_64-pc-windows-msvc +//@ compile-flags: -O -C relocation-model=static +//@ aux-build: extern_decl.rs +//@ only-x86_64-pc-windows-msvc #![crate_type = "rlib"] diff --git a/tests/codegen/staticlib-external-inline-fns.rs b/tests/codegen/staticlib-external-inline-fns.rs index 432c063e826e..23316a2d9a5f 100644 --- a/tests/codegen/staticlib-external-inline-fns.rs +++ b/tests/codegen/staticlib-external-inline-fns.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes +//@ compile-flags: -C no-prepopulate-passes #![crate_type = "staticlib"] diff --git a/tests/codegen/stores.rs b/tests/codegen/stores.rs index a8e155c4c8a4..3fda5aa47eaf 100644 --- a/tests/codegen/stores.rs +++ b/tests/codegen/stores.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes +//@ compile-flags: -C no-prepopulate-passes // #![crate_type = "lib"] diff --git a/tests/codegen/swap-large-types.rs b/tests/codegen/swap-large-types.rs index 7b6611f3da43..206978908140 100644 --- a/tests/codegen/swap-large-types.rs +++ b/tests/codegen/swap-large-types.rs @@ -1,6 +1,6 @@ -// compile-flags: -O -// only-x86_64 -// ignore-debug: the debug assertions get in the way +//@ compile-flags: -O +//@ only-x86_64 +//@ ignore-debug: the debug assertions get in the way #![crate_type = "lib"] diff --git a/tests/codegen/swap-small-types.rs b/tests/codegen/swap-small-types.rs index 2c6751744798..8d7f9f49eef6 100644 --- a/tests/codegen/swap-small-types.rs +++ b/tests/codegen/swap-small-types.rs @@ -1,6 +1,6 @@ -// compile-flags: -O -Z merge-functions=disabled -// only-x86_64 -// ignore-debug: the debug assertions get in the way +//@ compile-flags: -O -Z merge-functions=disabled +//@ only-x86_64 +//@ ignore-debug: the debug assertions get in the way #![crate_type = "lib"] diff --git a/tests/codegen/target-cpu-on-functions.rs b/tests/codegen/target-cpu-on-functions.rs index d5250f22cca9..25c10e7ce448 100644 --- a/tests/codegen/target-cpu-on-functions.rs +++ b/tests/codegen/target-cpu-on-functions.rs @@ -1,9 +1,9 @@ // This test makes sure that functions get annotated with the proper // "target-cpu" attribute in LLVM. -// no-prefer-dynamic +//@ no-prefer-dynamic // -// compile-flags: -C no-prepopulate-passes -C panic=abort -C linker-plugin-lto -Cpasses=name-anon-globals +//@ compile-flags: -C no-prepopulate-passes -C panic=abort -C linker-plugin-lto -Cpasses=name-anon-globals #![crate_type = "staticlib"] diff --git a/tests/codegen/target-feature-inline-closure.rs b/tests/codegen/target-feature-inline-closure.rs index 54cb27242d5a..88bd413a8707 100644 --- a/tests/codegen/target-feature-inline-closure.rs +++ b/tests/codegen/target-feature-inline-closure.rs @@ -1,5 +1,5 @@ -// only-x86_64 -// compile-flags: -Copt-level=3 +//@ only-x86_64 +//@ compile-flags: -Copt-level=3 #![crate_type = "lib"] #![feature(target_feature_11)] diff --git a/tests/codegen/target-feature-overrides.rs b/tests/codegen/target-feature-overrides.rs index 1bebf66f0df4..61b1b3fd2578 100644 --- a/tests/codegen/target-feature-overrides.rs +++ b/tests/codegen/target-feature-overrides.rs @@ -1,8 +1,8 @@ -// revisions: COMPAT INCOMPAT -// needs-llvm-components: x86 -// compile-flags: --target=x86_64-unknown-linux-gnu -Copt-level=3 -// [COMPAT] compile-flags: -Ctarget-feature=+avx2,+avx -// [INCOMPAT] compile-flags: -Ctarget-feature=-avx2,-avx +//@ revisions: COMPAT INCOMPAT +//@ needs-llvm-components: x86 +//@ compile-flags: --target=x86_64-unknown-linux-gnu -Copt-level=3 +//@ [COMPAT] compile-flags: -Ctarget-feature=+avx2,+avx +//@ [INCOMPAT] compile-flags: -Ctarget-feature=-avx2,-avx // See also tests/assembly/target-feature-multiple.rs #![feature(no_core, lang_items)] diff --git a/tests/codegen/thin-lto.rs b/tests/codegen/thin-lto.rs index 7991cad7a0ca..c75f9841a773 100644 --- a/tests/codegen/thin-lto.rs +++ b/tests/codegen/thin-lto.rs @@ -1,5 +1,5 @@ -// compile-flags: -O -C lto=thin -C prefer-dynamic=no -// only-x86_64-unknown-linux-gnu +//@ compile-flags: -O -C lto=thin -C prefer-dynamic=no +//@ only-x86_64-unknown-linux-gnu // CHECK: main diff --git a/tests/codegen/thread-local.rs b/tests/codegen/thread-local.rs index caf0366d2c14..2ee15811cc3d 100644 --- a/tests/codegen/thread-local.rs +++ b/tests/codegen/thread-local.rs @@ -1,10 +1,10 @@ -// compile-flags: -O -// aux-build:thread_local_aux.rs -// ignore-windows FIXME(#84933) -// ignore-wasm globals are used instead of thread locals -// ignore-emscripten globals are used instead of thread locals -// ignore-android does not use #[thread_local] -// ignore-nto does not use #[thread_local] +//@ compile-flags: -O +//@ aux-build:thread_local_aux.rs +//@ ignore-windows FIXME(#84933) +//@ ignore-wasm globals are used instead of thread locals +//@ ignore-emscripten globals are used instead of thread locals +//@ ignore-android does not use #[thread_local] +//@ ignore-nto does not use #[thread_local] #![crate_type = "lib"] diff --git a/tests/codegen/tied-features-strength.rs b/tests/codegen/tied-features-strength.rs index 71cea48c4da5..b97865295a23 100644 --- a/tests/codegen/tied-features-strength.rs +++ b/tests/codegen/tied-features-strength.rs @@ -1,22 +1,22 @@ // ignore-tidy-linelength -// revisions: ENABLE_SVE DISABLE_SVE DISABLE_NEON ENABLE_NEON -// compile-flags: --crate-type=rlib --target=aarch64-unknown-linux-gnu -// needs-llvm-components: aarch64 +//@ revisions: ENABLE_SVE DISABLE_SVE DISABLE_NEON ENABLE_NEON +//@ compile-flags: --crate-type=rlib --target=aarch64-unknown-linux-gnu +//@ needs-llvm-components: aarch64 // The "+v8a" feature is matched as optional as it isn't added when we // are targeting older LLVM versions. Once the min supported version // is LLVM-14 we can remove the optional regex matching for this feature. -// [ENABLE_SVE] compile-flags: -C target-feature=+sve -Copt-level=0 +//@ [ENABLE_SVE] compile-flags: -C target-feature=+sve -Copt-level=0 // ENABLE_SVE: attributes #0 = { {{.*}} "target-features"="{{((\+outline-atomics,?)|(\+v8a,?)?|(\+sve,?)|(\+neon,?))*}}" } -// [DISABLE_SVE] compile-flags: -C target-feature=-sve -Copt-level=0 +//@ [DISABLE_SVE] compile-flags: -C target-feature=-sve -Copt-level=0 // DISABLE_SVE: attributes #0 = { {{.*}} "target-features"="{{((\+outline-atomics,?)|(\+v8a,?)?|(-sve,?)|(\+neon,?))*}}" } -// [DISABLE_NEON] compile-flags: -C target-feature=-neon -Copt-level=0 +//@ [DISABLE_NEON] compile-flags: -C target-feature=-neon -Copt-level=0 // DISABLE_NEON: attributes #0 = { {{.*}} "target-features"="{{((\+outline-atomics,?)|(\+v8a,?)?|(-fp-armv8,?)|(-neon,?))*}}" } -// [ENABLE_NEON] compile-flags: -C target-feature=+neon -Copt-level=0 +//@ [ENABLE_NEON] compile-flags: -C target-feature=+neon -Copt-level=0 // ENABLE_NEON: attributes #0 = { {{.*}} "target-features"="{{((\+outline-atomics,?)|(\+v8a,?)?|(\+fp-armv8,?)|(\+neon,?))*}}" } diff --git a/tests/codegen/to_vec.rs b/tests/codegen/to_vec.rs index 60dc4efcb625..651084d811ca 100644 --- a/tests/codegen/to_vec.rs +++ b/tests/codegen/to_vec.rs @@ -1,4 +1,4 @@ -// compile-flags: -O +//@ compile-flags: -O #![crate_type = "lib"] diff --git a/tests/codegen/trailing_zeros.rs b/tests/codegen/trailing_zeros.rs index 2ea0e447abe2..66560c0d4fc4 100644 --- a/tests/codegen/trailing_zeros.rs +++ b/tests/codegen/trailing_zeros.rs @@ -1,5 +1,5 @@ -// compile-flags: -O -// min-llvm-version: 17 +//@ compile-flags: -O +//@ min-llvm-version: 17 #![crate_type = "lib"] diff --git a/tests/codegen/transmute-optimized.rs b/tests/codegen/transmute-optimized.rs index b8c51b08499f..43d2a55c9955 100644 --- a/tests/codegen/transmute-optimized.rs +++ b/tests/codegen/transmute-optimized.rs @@ -1,5 +1,5 @@ -// compile-flags: -O -Z merge-functions=disabled -// ignore-debug +//@ compile-flags: -O -Z merge-functions=disabled +//@ ignore-debug #![crate_type = "lib"] diff --git a/tests/codegen/transmute-scalar.rs b/tests/codegen/transmute-scalar.rs index 39126b024a6e..7a5eb4dfcd5c 100644 --- a/tests/codegen/transmute-scalar.rs +++ b/tests/codegen/transmute-scalar.rs @@ -1,4 +1,4 @@ -// compile-flags: -C opt-level=0 -C no-prepopulate-passes +//@ compile-flags: -C opt-level=0 -C no-prepopulate-passes #![crate_type = "lib"] diff --git a/tests/codegen/try_identity.rs b/tests/codegen/try_identity.rs index 92be90014ffc..87b7d0727d08 100644 --- a/tests/codegen/try_identity.rs +++ b/tests/codegen/try_identity.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes -O -Z mir-opt-level=3 -Zunsound-mir-opts +//@ compile-flags: -C no-prepopulate-passes -O -Z mir-opt-level=3 -Zunsound-mir-opts // Ensure that `x?` has no overhead on `Result` due to identity `match`es in lowering. // This requires inlining to trigger the MIR optimizations in `SimplifyArmIdentity`. diff --git a/tests/codegen/try_question_mark_nop.rs b/tests/codegen/try_question_mark_nop.rs index 9d34155bdd79..58cd6ff233a1 100644 --- a/tests/codegen/try_question_mark_nop.rs +++ b/tests/codegen/try_question_mark_nop.rs @@ -1,5 +1,5 @@ -// compile-flags: -O -Z merge-functions=disabled --edition=2021 -// only-x86_64 +//@ compile-flags: -O -Z merge-functions=disabled --edition=2021 +//@ only-x86_64 #![crate_type = "lib"] #![feature(try_blocks)] diff --git a/tests/codegen/tune-cpu-on-functions.rs b/tests/codegen/tune-cpu-on-functions.rs index 116f0772d255..dc04c4819af5 100644 --- a/tests/codegen/tune-cpu-on-functions.rs +++ b/tests/codegen/tune-cpu-on-functions.rs @@ -1,9 +1,9 @@ // This test makes sure that functions get annotated with the proper // "tune-cpu" attribute in LLVM. -// no-prefer-dynamic +//@ no-prefer-dynamic // -// compile-flags: -C no-prepopulate-passes -C panic=abort -C linker-plugin-lto -Cpasses=name-anon-globals -Z tune-cpu=generic -Copt-level=0 +//@ compile-flags: -C no-prepopulate-passes -C panic=abort -C linker-plugin-lto -Cpasses=name-anon-globals -Z tune-cpu=generic -Copt-level=0 #![crate_type = "staticlib"] diff --git a/tests/codegen/tuple-layout-opt.rs b/tests/codegen/tuple-layout-opt.rs index 7cc67a9b51c1..dab1e42f6b5d 100644 --- a/tests/codegen/tuple-layout-opt.rs +++ b/tests/codegen/tuple-layout-opt.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes -Copt-level=0 +//@ compile-flags: -C no-prepopulate-passes -Copt-level=0 // Test that tuples get optimized layout, in particular with a ZST in the last field (#63244) diff --git a/tests/codegen/unchecked-float-casts.rs b/tests/codegen/unchecked-float-casts.rs index 4e3bfcd43974..d1869abc87bb 100644 --- a/tests/codegen/unchecked-float-casts.rs +++ b/tests/codegen/unchecked-float-casts.rs @@ -1,8 +1,8 @@ // This file tests that we don't generate any code for saturation when using the // unchecked intrinsics. -// compile-flags: -C opt-level=3 -// ignore-wasm32 the wasm target is tested in `wasm_casts_*` +//@ compile-flags: -C opt-level=3 +//@ ignore-wasm32 the wasm target is tested in `wasm_casts_*` #![crate_type = "lib"] diff --git a/tests/codegen/unchecked_shifts.rs b/tests/codegen/unchecked_shifts.rs index eded894c6d08..4e351d8d3335 100644 --- a/tests/codegen/unchecked_shifts.rs +++ b/tests/codegen/unchecked_shifts.rs @@ -1,5 +1,5 @@ -// compile-flags: -O -// ignore-debug (because unchecked is checked in debug) +//@ compile-flags: -O +//@ ignore-debug (because unchecked is checked in debug) #![crate_type = "lib"] #![feature(unchecked_shifts)] diff --git a/tests/codegen/uninit-consts.rs b/tests/codegen/uninit-consts.rs index 1313e67634a3..649927b87b40 100644 --- a/tests/codegen/uninit-consts.rs +++ b/tests/codegen/uninit-consts.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes +//@ compile-flags: -C no-prepopulate-passes // Check that we use undef (and not zero) for uninitialized bytes in constants. diff --git a/tests/codegen/union-abi.rs b/tests/codegen/union-abi.rs index 4878ae5c3b68..b1b0daa13b64 100644 --- a/tests/codegen/union-abi.rs +++ b/tests/codegen/union-abi.rs @@ -1,5 +1,5 @@ -// ignore-emscripten vectors passed directly -// compile-flags: -O -C no-prepopulate-passes +//@ ignore-emscripten vectors passed directly +//@ compile-flags: -O -C no-prepopulate-passes // This test that using union forward the abi of the inner type, as // discussed in #54668 diff --git a/tests/codegen/unwind-abis/aapcs-unwind-abi.rs b/tests/codegen/unwind-abis/aapcs-unwind-abi.rs index c092e28a05ac..484af78105f1 100644 --- a/tests/codegen/unwind-abis/aapcs-unwind-abi.rs +++ b/tests/codegen/unwind-abis/aapcs-unwind-abi.rs @@ -1,5 +1,5 @@ -// needs-llvm-components: arm -// compile-flags: --target=armv7-unknown-linux-gnueabihf --crate-type=rlib -Cno-prepopulate-passes +//@ needs-llvm-components: arm +//@ compile-flags: --target=armv7-unknown-linux-gnueabihf --crate-type=rlib -Cno-prepopulate-passes #![no_core] #![feature(no_core, lang_items, c_unwind)] #[lang="sized"] diff --git a/tests/codegen/unwind-abis/c-unwind-abi-panic-abort.rs b/tests/codegen/unwind-abis/c-unwind-abi-panic-abort.rs index ea5bae18e233..8bb2122946fc 100644 --- a/tests/codegen/unwind-abis/c-unwind-abi-panic-abort.rs +++ b/tests/codegen/unwind-abis/c-unwind-abi-panic-abort.rs @@ -1,4 +1,4 @@ -// compile-flags: -C panic=abort +//@ compile-flags: -C panic=abort // Test that `nounwind` attributes are also applied to extern `C-unwind` Rust functions // when the code is compiled with `panic=abort`. diff --git a/tests/codegen/unwind-abis/c-unwind-abi.rs b/tests/codegen/unwind-abis/c-unwind-abi.rs index fa5b6bad75cb..140c18e6bb33 100644 --- a/tests/codegen/unwind-abis/c-unwind-abi.rs +++ b/tests/codegen/unwind-abis/c-unwind-abi.rs @@ -1,5 +1,5 @@ -// compile-flags: -C opt-level=0 -// needs-unwind +//@ compile-flags: -C opt-level=0 +//@ needs-unwind // Test that `nounwind` attributes are correctly applied to exported `C` and `C-unwind` extern // functions. `C-unwind` functions MUST NOT have this attribute. We disable optimizations above diff --git a/tests/codegen/unwind-abis/cdecl-unwind-abi.rs b/tests/codegen/unwind-abis/cdecl-unwind-abi.rs index 64746d32175b..5604b8d5765a 100644 --- a/tests/codegen/unwind-abis/cdecl-unwind-abi.rs +++ b/tests/codegen/unwind-abis/cdecl-unwind-abi.rs @@ -1,5 +1,5 @@ -// compile-flags: -C opt-level=0 -// needs-unwind +//@ compile-flags: -C opt-level=0 +//@ needs-unwind // Test that `nounwind` attributes are correctly applied to exported `cdecl` and // `cdecl-unwind` extern functions. `cdecl-unwind` functions MUST NOT have this attribute. We diff --git a/tests/codegen/unwind-abis/fastcall-unwind-abi.rs b/tests/codegen/unwind-abis/fastcall-unwind-abi.rs index b74099a5d965..18e2cd22c8aa 100644 --- a/tests/codegen/unwind-abis/fastcall-unwind-abi.rs +++ b/tests/codegen/unwind-abis/fastcall-unwind-abi.rs @@ -1,5 +1,5 @@ -// needs-llvm-components: x86 -// compile-flags: --target=i686-pc-windows-msvc --crate-type=rlib -Cno-prepopulate-passes +//@ needs-llvm-components: x86 +//@ compile-flags: --target=i686-pc-windows-msvc --crate-type=rlib -Cno-prepopulate-passes #![no_core] #![feature(no_core, lang_items, c_unwind)] #[lang="sized"] diff --git a/tests/codegen/unwind-abis/nounwind-on-stable-panic-abort.rs b/tests/codegen/unwind-abis/nounwind-on-stable-panic-abort.rs index 106d593b21de..0b3bfd567aa6 100644 --- a/tests/codegen/unwind-abis/nounwind-on-stable-panic-abort.rs +++ b/tests/codegen/unwind-abis/nounwind-on-stable-panic-abort.rs @@ -1,5 +1,5 @@ -// compile-flags: -C opt-level=0 -Cpanic=abort -// ignore-wasm32-bare compiled with panic=abort by default +//@ compile-flags: -C opt-level=0 -Cpanic=abort +//@ ignore-wasm32-bare compiled with panic=abort by default #![crate_type = "lib"] diff --git a/tests/codegen/unwind-abis/nounwind-on-stable-panic-unwind.rs b/tests/codegen/unwind-abis/nounwind-on-stable-panic-unwind.rs index dc3911cd4eba..1e6f8c9ede90 100644 --- a/tests/codegen/unwind-abis/nounwind-on-stable-panic-unwind.rs +++ b/tests/codegen/unwind-abis/nounwind-on-stable-panic-unwind.rs @@ -1,6 +1,6 @@ -// compile-flags: -C opt-level=0 -// ignore-wasm32-bare compiled with panic=abort by default -// needs-unwind +//@ compile-flags: -C opt-level=0 +//@ ignore-wasm32-bare compiled with panic=abort by default +//@ needs-unwind #![crate_type = "lib"] diff --git a/tests/codegen/unwind-abis/nounwind.rs b/tests/codegen/unwind-abis/nounwind.rs index c46d717331b4..ac53cd7bed3c 100644 --- a/tests/codegen/unwind-abis/nounwind.rs +++ b/tests/codegen/unwind-abis/nounwind.rs @@ -1,5 +1,5 @@ -// compile-flags: -C opt-level=0 -Cpanic=abort -// ignore-wasm32-bare compiled with panic=abort by default +//@ compile-flags: -C opt-level=0 -Cpanic=abort +//@ ignore-wasm32-bare compiled with panic=abort by default #![crate_type = "lib"] #![feature(c_unwind)] diff --git a/tests/codegen/unwind-abis/stdcall-unwind-abi.rs b/tests/codegen/unwind-abis/stdcall-unwind-abi.rs index 8eff0719f8fa..a5e600fe076f 100644 --- a/tests/codegen/unwind-abis/stdcall-unwind-abi.rs +++ b/tests/codegen/unwind-abis/stdcall-unwind-abi.rs @@ -1,5 +1,5 @@ -// needs-llvm-components: x86 -// compile-flags: --target=i686-pc-windows-msvc --crate-type=rlib -Cno-prepopulate-passes +//@ needs-llvm-components: x86 +//@ compile-flags: --target=i686-pc-windows-msvc --crate-type=rlib -Cno-prepopulate-passes #![no_core] #![feature(no_core, lang_items, c_unwind)] #[lang="sized"] diff --git a/tests/codegen/unwind-abis/system-unwind-abi.rs b/tests/codegen/unwind-abis/system-unwind-abi.rs index f274a33b0994..b001c1f951c4 100644 --- a/tests/codegen/unwind-abis/system-unwind-abi.rs +++ b/tests/codegen/unwind-abis/system-unwind-abi.rs @@ -1,5 +1,5 @@ -// compile-flags: -C opt-level=0 -// needs-unwind +//@ compile-flags: -C opt-level=0 +//@ needs-unwind // Test that `nounwind` attributes are correctly applied to exported `system` and `system-unwind` // extern functions. `system-unwind` functions MUST NOT have this attribute. We disable diff --git a/tests/codegen/unwind-abis/sysv64-unwind-abi.rs b/tests/codegen/unwind-abis/sysv64-unwind-abi.rs index 694fde17c3cb..49407f748bc3 100644 --- a/tests/codegen/unwind-abis/sysv64-unwind-abi.rs +++ b/tests/codegen/unwind-abis/sysv64-unwind-abi.rs @@ -1,5 +1,5 @@ -// needs-llvm-components: x86 -// compile-flags: --target=x86_64-unknown-linux-gnu --crate-type=rlib -Cno-prepopulate-passes +//@ needs-llvm-components: x86 +//@ compile-flags: --target=x86_64-unknown-linux-gnu --crate-type=rlib -Cno-prepopulate-passes #![no_core] #![feature(no_core, lang_items, c_unwind)] #[lang="sized"] diff --git a/tests/codegen/unwind-abis/thiscall-unwind-abi.rs b/tests/codegen/unwind-abis/thiscall-unwind-abi.rs index 0a02755a2cd8..d07e9b81d783 100644 --- a/tests/codegen/unwind-abis/thiscall-unwind-abi.rs +++ b/tests/codegen/unwind-abis/thiscall-unwind-abi.rs @@ -1,5 +1,5 @@ -// needs-llvm-components: x86 -// compile-flags: --target=i686-pc-windows-msvc --crate-type=rlib -Cno-prepopulate-passes +//@ needs-llvm-components: x86 +//@ compile-flags: --target=i686-pc-windows-msvc --crate-type=rlib -Cno-prepopulate-passes #![no_core] #![feature(no_core, lang_items, c_unwind)] #[lang="sized"] diff --git a/tests/codegen/unwind-abis/vectorcall-unwind-abi.rs b/tests/codegen/unwind-abis/vectorcall-unwind-abi.rs index d7eca2a97000..a89794fbf6e3 100644 --- a/tests/codegen/unwind-abis/vectorcall-unwind-abi.rs +++ b/tests/codegen/unwind-abis/vectorcall-unwind-abi.rs @@ -1,5 +1,5 @@ -// needs-llvm-components: x86 -// compile-flags: --target=i686-pc-windows-msvc --crate-type=rlib -Cno-prepopulate-passes +//@ needs-llvm-components: x86 +//@ compile-flags: --target=i686-pc-windows-msvc --crate-type=rlib -Cno-prepopulate-passes #![no_core] #![feature(no_core, lang_items, c_unwind, abi_vectorcall)] #[lang="sized"] diff --git a/tests/codegen/unwind-abis/win64-unwind-abi.rs b/tests/codegen/unwind-abis/win64-unwind-abi.rs index 6591348c35d3..aa466469c4de 100644 --- a/tests/codegen/unwind-abis/win64-unwind-abi.rs +++ b/tests/codegen/unwind-abis/win64-unwind-abi.rs @@ -1,5 +1,5 @@ -// needs-llvm-components: x86 -// compile-flags: --target=x86_64-unknown-linux-gnu --crate-type=rlib -Cno-prepopulate-passes +//@ needs-llvm-components: x86 +//@ compile-flags: --target=x86_64-unknown-linux-gnu --crate-type=rlib -Cno-prepopulate-passes #![no_core] #![feature(no_core, lang_items, c_unwind)] #[lang="sized"] diff --git a/tests/codegen/unwind-and-panic-abort.rs b/tests/codegen/unwind-and-panic-abort.rs index e43e73b96b99..430502308cf0 100644 --- a/tests/codegen/unwind-and-panic-abort.rs +++ b/tests/codegen/unwind-and-panic-abort.rs @@ -1,4 +1,4 @@ -// compile-flags: -C panic=abort +//@ compile-flags: -C panic=abort #![crate_type = "lib"] #![feature(c_unwind)] diff --git a/tests/codegen/unwind-extern-exports.rs b/tests/codegen/unwind-extern-exports.rs index 4e1e719d5cd1..d670a776ac69 100644 --- a/tests/codegen/unwind-extern-exports.rs +++ b/tests/codegen/unwind-extern-exports.rs @@ -1,6 +1,6 @@ -// compile-flags: -C opt-level=0 -// ignore-wasm32-bare compiled with panic=abort by default -// needs-unwind +//@ compile-flags: -C opt-level=0 +//@ ignore-wasm32-bare compiled with panic=abort by default +//@ needs-unwind #![crate_type = "lib"] #![feature(c_unwind)] diff --git a/tests/codegen/unwind-extern-imports.rs b/tests/codegen/unwind-extern-imports.rs index 260dcc628cc0..7386704b4309 100644 --- a/tests/codegen/unwind-extern-imports.rs +++ b/tests/codegen/unwind-extern-imports.rs @@ -1,6 +1,6 @@ -// compile-flags: -C no-prepopulate-passes -// ignore-wasm32-bare compiled with panic=abort by default -// needs-unwind +//@ compile-flags: -C no-prepopulate-passes +//@ ignore-wasm32-bare compiled with panic=abort by default +//@ needs-unwind #![crate_type = "lib"] #![feature(c_unwind)] diff --git a/tests/codegen/unwind-landingpad-cold.rs b/tests/codegen/unwind-landingpad-cold.rs index 3a902a7d7123..fa200bc300cf 100644 --- a/tests/codegen/unwind-landingpad-cold.rs +++ b/tests/codegen/unwind-landingpad-cold.rs @@ -1,6 +1,6 @@ -// compile-flags: -Cno-prepopulate-passes -// needs-unwind -// min-llvm-version: 17.0.2 +//@ compile-flags: -Cno-prepopulate-passes +//@ needs-unwind +//@ min-llvm-version: 17.0.2 #![crate_type = "lib"] // This test checks that drop calls in unwind landing pads diff --git a/tests/codegen/unwind-landingpad-inline.rs b/tests/codegen/unwind-landingpad-inline.rs index 0774cefdd2d1..953ba5e901a2 100644 --- a/tests/codegen/unwind-landingpad-inline.rs +++ b/tests/codegen/unwind-landingpad-inline.rs @@ -1,6 +1,6 @@ -// min-llvm-version: 17.0.2 -// compile-flags: -Copt-level=3 -// ignore-debug: the debug assertions get in the way +//@ min-llvm-version: 17.0.2 +//@ compile-flags: -Copt-level=3 +//@ ignore-debug: the debug assertions get in the way #![crate_type = "lib"] // This test checks that we can inline drop_in_place in diff --git a/tests/codegen/var-names.rs b/tests/codegen/var-names.rs index d4715efad73c..fd163a55551b 100644 --- a/tests/codegen/var-names.rs +++ b/tests/codegen/var-names.rs @@ -1,4 +1,4 @@ -// compile-flags: -O -C no-prepopulate-passes +//@ compile-flags: -O -C no-prepopulate-passes #![crate_type = "lib"] diff --git a/tests/codegen/vec-as-ptr.rs b/tests/codegen/vec-as-ptr.rs index 76098bc08a31..17869c21c832 100644 --- a/tests/codegen/vec-as-ptr.rs +++ b/tests/codegen/vec-as-ptr.rs @@ -1,4 +1,4 @@ -// compile-flags: -O -Zmerge-functions=disabled +//@ compile-flags: -O -Zmerge-functions=disabled #![crate_type = "lib"] diff --git a/tests/codegen/vec-calloc.rs b/tests/codegen/vec-calloc.rs index a5fda7b2449a..bae344ab01d6 100644 --- a/tests/codegen/vec-calloc.rs +++ b/tests/codegen/vec-calloc.rs @@ -1,6 +1,6 @@ -// compile-flags: -O -Z merge-functions=disabled -// only-x86_64 -// ignore-debug +//@ compile-flags: -O -Z merge-functions=disabled +//@ only-x86_64 +//@ ignore-debug #![crate_type = "lib"] diff --git a/tests/codegen/vec-in-place.rs b/tests/codegen/vec-in-place.rs index 5cf7add836df..3ac2ec13d476 100644 --- a/tests/codegen/vec-in-place.rs +++ b/tests/codegen/vec-in-place.rs @@ -1,5 +1,5 @@ -// ignore-debug: the debug assertions get in the way -// compile-flags: -O -Z merge-functions=disabled +//@ ignore-debug: the debug assertions get in the way +//@ compile-flags: -O -Z merge-functions=disabled #![crate_type = "lib"] // Ensure that trivial casts of vec elements are O(1) diff --git a/tests/codegen/vec-iter-collect-len.rs b/tests/codegen/vec-iter-collect-len.rs index 3a0d6c309192..0c225abd326d 100644 --- a/tests/codegen/vec-iter-collect-len.rs +++ b/tests/codegen/vec-iter-collect-len.rs @@ -1,5 +1,5 @@ -// ignore-debug: the debug assertions get in the way -// compile-flags: -O +//@ ignore-debug: the debug assertions get in the way +//@ compile-flags: -O #![crate_type="lib"] #[no_mangle] diff --git a/tests/codegen/vec-iter.rs b/tests/codegen/vec-iter.rs index 4e2068587510..47e11af5bc3d 100644 --- a/tests/codegen/vec-iter.rs +++ b/tests/codegen/vec-iter.rs @@ -1,5 +1,5 @@ -// ignore-debug: the debug assertions get in the way -// compile-flags: -O +//@ ignore-debug: the debug assertions get in the way +//@ compile-flags: -O #![crate_type = "lib"] #![feature(exact_size_is_empty)] diff --git a/tests/codegen/vec-optimizes-away.rs b/tests/codegen/vec-optimizes-away.rs index 3be342dabeb6..9cbfbc115b04 100644 --- a/tests/codegen/vec-optimizes-away.rs +++ b/tests/codegen/vec-optimizes-away.rs @@ -1,5 +1,5 @@ -// ignore-debug: the debug assertions get in the way -// compile-flags: -O +//@ ignore-debug: the debug assertions get in the way +//@ compile-flags: -O #![crate_type = "lib"] #[no_mangle] diff --git a/tests/codegen/vec-reserve-extend.rs b/tests/codegen/vec-reserve-extend.rs index 395373ff4f10..12795937bc81 100644 --- a/tests/codegen/vec-reserve-extend.rs +++ b/tests/codegen/vec-reserve-extend.rs @@ -1,5 +1,5 @@ -// compile-flags: -O -// ignore-debug +//@ compile-flags: -O +//@ ignore-debug // (with debug assertions turned on, `assert_unchecked` generates a real assertion) #![crate_type = "lib"] diff --git a/tests/codegen/vec-shrink-panik.rs b/tests/codegen/vec-shrink-panik.rs index 14fef4e2cd55..33b70300bf41 100644 --- a/tests/codegen/vec-shrink-panik.rs +++ b/tests/codegen/vec-shrink-panik.rs @@ -1,11 +1,11 @@ -// revisions: old new +//@ revisions: old new // LLVM 17 realizes double panic is not possible and doesn't generate calls // to panic_cannot_unwind. -// [old]ignore-llvm-version: 17 - 99 -// [new]min-llvm-version: 17 -// compile-flags: -O -// ignore-debug: the debug assertions get in the way -// needs-unwind +//@ [old]ignore-llvm-version: 17 - 99 +//@ [new]min-llvm-version: 17 +//@ compile-flags: -O +//@ ignore-debug: the debug assertions get in the way +//@ needs-unwind #![crate_type = "lib"] #![feature(shrink_to)] diff --git a/tests/codegen/vec_pop_push_noop.rs b/tests/codegen/vec_pop_push_noop.rs index d9293f2b75de..5a2009b01d7c 100644 --- a/tests/codegen/vec_pop_push_noop.rs +++ b/tests/codegen/vec_pop_push_noop.rs @@ -1,5 +1,5 @@ -// compile-flags: -O -// ignore-debug +//@ compile-flags: -O +//@ ignore-debug // (with debug assertions turned on, `assert_unchecked` generates a real assertion) #![crate_type = "lib"] diff --git a/tests/codegen/vecdeque-drain.rs b/tests/codegen/vecdeque-drain.rs index f8263c695724..cd549f8ebd4a 100644 --- a/tests/codegen/vecdeque-drain.rs +++ b/tests/codegen/vecdeque-drain.rs @@ -1,7 +1,7 @@ // Check that draining at the front or back doesn't copy memory. -// compile-flags: -O -// ignore-debug: the debug assertions get in the way +//@ compile-flags: -O +//@ ignore-debug: the debug assertions get in the way #![crate_type = "lib"] diff --git a/tests/codegen/vecdeque-nonempty-get-no-panic.rs b/tests/codegen/vecdeque-nonempty-get-no-panic.rs index c2877d2d0ca9..1128b4ed7a44 100644 --- a/tests/codegen/vecdeque-nonempty-get-no-panic.rs +++ b/tests/codegen/vecdeque-nonempty-get-no-panic.rs @@ -1,7 +1,7 @@ // Guards against regression for optimization discussed in issue #80836 -// compile-flags: -O -// ignore-debug: the debug assertions get in the way +//@ compile-flags: -O +//@ ignore-debug: the debug assertions get in the way #![crate_type = "lib"] diff --git a/tests/codegen/vecdeque_no_panic.rs b/tests/codegen/vecdeque_no_panic.rs index cbf420bada99..57b6b2abbea9 100644 --- a/tests/codegen/vecdeque_no_panic.rs +++ b/tests/codegen/vecdeque_no_panic.rs @@ -1,7 +1,7 @@ // This test checks that `VecDeque::front[_mut]()` and `VecDeque::back[_mut]()` can't panic. -// compile-flags: -O -// ignore-debug: the debug assertions get in the way +//@ compile-flags: -O +//@ ignore-debug: the debug assertions get in the way #![crate_type = "lib"] diff --git a/tests/codegen/virtual-function-elimination-32bit.rs b/tests/codegen/virtual-function-elimination-32bit.rs index 6f963363a998..76223be1f3da 100644 --- a/tests/codegen/virtual-function-elimination-32bit.rs +++ b/tests/codegen/virtual-function-elimination-32bit.rs @@ -1,5 +1,5 @@ -// compile-flags: -Zvirtual-function-elimination -Clto -O -Csymbol-mangling-version=v0 -// ignore-64bit +//@ compile-flags: -Zvirtual-function-elimination -Clto -O -Csymbol-mangling-version=v0 +//@ ignore-64bit // CHECK: @vtable.0 = {{.*}}, !type ![[TYPE0:[0-9]+]], !vcall_visibility ![[VCALL_VIS0:[0-9]+]] diff --git a/tests/codegen/virtual-function-elimination.rs b/tests/codegen/virtual-function-elimination.rs index f22176a024fc..bf4a74085ed8 100644 --- a/tests/codegen/virtual-function-elimination.rs +++ b/tests/codegen/virtual-function-elimination.rs @@ -1,6 +1,6 @@ -// compile-flags: -Zvirtual-function-elimination -Clto -O -Csymbol-mangling-version=v0 -// ignore-32bit -// ignore-debug +//@ compile-flags: -Zvirtual-function-elimination -Clto -O -Csymbol-mangling-version=v0 +//@ ignore-32bit +//@ ignore-debug // CHECK: @vtable.0 = {{.*}}, !type ![[TYPE0:[0-9]+]], !vcall_visibility ![[VCALL_VIS0:[0-9]+]] // CHECK: @vtable.1 = {{.*}}, !type ![[TYPE1:[0-9]+]], !vcall_visibility ![[VCALL_VIS0:[0-9]+]] diff --git a/tests/codegen/wasm_casts_trapping.rs b/tests/codegen/wasm_casts_trapping.rs index eb06c4975bb7..0908acd85fcb 100644 --- a/tests/codegen/wasm_casts_trapping.rs +++ b/tests/codegen/wasm_casts_trapping.rs @@ -1,5 +1,5 @@ -// only-wasm32 -// compile-flags: -C target-feature=-nontrapping-fptoint +//@ only-wasm32 +//@ compile-flags: -C target-feature=-nontrapping-fptoint #![crate_type = "lib"] // CHECK-LABEL: @cast_f64_i64 diff --git a/tests/codegen/wasm_exceptions.rs b/tests/codegen/wasm_exceptions.rs index 2b2359f5b6ca..48a7357bfd8d 100644 --- a/tests/codegen/wasm_exceptions.rs +++ b/tests/codegen/wasm_exceptions.rs @@ -1,5 +1,5 @@ -// only-wasm32-bare -// compile-flags: -C panic=unwind +//@ only-wasm32-bare +//@ compile-flags: -C panic=unwind #![crate_type = "lib"] #![feature(core_intrinsics)] diff --git a/tests/codegen/zip.rs b/tests/codegen/zip.rs index e55f4f1a2de3..5db0a93b78ef 100644 --- a/tests/codegen/zip.rs +++ b/tests/codegen/zip.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes -O +//@ compile-flags: -C no-prepopulate-passes -O #![crate_type = "lib"] diff --git a/tests/codegen/zst-offset.rs b/tests/codegen/zst-offset.rs index 56dfd96ab2cf..ad996d8ae1b6 100644 --- a/tests/codegen/zst-offset.rs +++ b/tests/codegen/zst-offset.rs @@ -1,4 +1,4 @@ -// compile-flags: -C no-prepopulate-passes -Copt-level=0 +//@ compile-flags: -C no-prepopulate-passes -Copt-level=0 #![crate_type = "lib"] #![feature(repr_simd)] diff --git a/tests/coverage-run-rustdoc/doctest.coverage b/tests/coverage-run-rustdoc/doctest.coverage index 5125dc075ee2..1bbf364759ba 100644 --- a/tests/coverage-run-rustdoc/doctest.coverage +++ b/tests/coverage-run-rustdoc/doctest.coverage @@ -10,7 +10,7 @@ $DIR/auxiliary/doctest_crate.rs: LL| 3|} $DIR/doctest.rs: - LL| |// aux-build:doctest_crate.rs + LL| |//@ aux-build:doctest_crate.rs LL| | LL| |//! This test ensures that code from doctests is properly re-mapped. LL| |//! See for more info. diff --git a/tests/coverage-run-rustdoc/doctest.rs b/tests/coverage-run-rustdoc/doctest.rs index 4006d723ce02..ddf493ae1f29 100644 --- a/tests/coverage-run-rustdoc/doctest.rs +++ b/tests/coverage-run-rustdoc/doctest.rs @@ -1,4 +1,4 @@ -// aux-build:doctest_crate.rs +//@ aux-build:doctest_crate.rs //! This test ensures that code from doctests is properly re-mapped. //! See for more info. diff --git a/tests/coverage/assert.coverage b/tests/coverage/assert.coverage index 8b997724c4a7..22fb6821fba3 100644 --- a/tests/coverage/assert.coverage +++ b/tests/coverage/assert.coverage @@ -1,5 +1,5 @@ LL| |#![allow(unused_assignments)] - LL| |// failure-status: 101 + LL| |//@ failure-status: 101 LL| | LL| 4|fn might_fail_assert(one_plus_one: u32) { LL| 4| println!("does 1 + 1 = {}?", one_plus_one); diff --git a/tests/coverage/assert.rs b/tests/coverage/assert.rs index 85e6662a6adc..bb7741bedbb5 100644 --- a/tests/coverage/assert.rs +++ b/tests/coverage/assert.rs @@ -1,5 +1,5 @@ #![allow(unused_assignments)] -// failure-status: 101 +//@ failure-status: 101 fn might_fail_assert(one_plus_one: u32) { println!("does 1 + 1 = {}?", one_plus_one); diff --git a/tests/coverage/assert_not.coverage b/tests/coverage/assert_not.coverage index 4cfdab974ed4..fd8247630c0e 100644 --- a/tests/coverage/assert_not.coverage +++ b/tests/coverage/assert_not.coverage @@ -1,4 +1,4 @@ - LL| |// edition: 2021 + LL| |//@ edition: 2021 LL| | LL| |// Regression test for . LL| |// `assert!(true)` and `assert!(!false)` should have similar coverage spans. diff --git a/tests/coverage/assert_not.rs b/tests/coverage/assert_not.rs index 95204fcadd1c..3d882f97d46d 100644 --- a/tests/coverage/assert_not.rs +++ b/tests/coverage/assert_not.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 // Regression test for . // `assert!(true)` and `assert!(!false)` should have similar coverage spans. diff --git a/tests/coverage/async.coverage b/tests/coverage/async.coverage index b4f6fc3a8a21..e943911d3104 100644 --- a/tests/coverage/async.coverage +++ b/tests/coverage/async.coverage @@ -3,8 +3,8 @@ LL| |#![feature(noop_waker)] LL| |#![allow(unused_assignments, dead_code)] LL| |#![rustfmt::skip] - LL| |// edition: 2018 - LL| |// compile-flags: -Copt-level=1 + LL| |//@ edition: 2018 + LL| |//@ compile-flags: -Copt-level=1 LL| | LL| 1|async fn c(x: u8) -> u8 { LL| 1| if x == 8 { diff --git a/tests/coverage/async.rs b/tests/coverage/async.rs index 6047cb79fb1b..5018ade0125f 100644 --- a/tests/coverage/async.rs +++ b/tests/coverage/async.rs @@ -3,8 +3,8 @@ #![feature(noop_waker)] #![allow(unused_assignments, dead_code)] #![rustfmt::skip] -// edition: 2018 -// compile-flags: -Copt-level=1 +//@ edition: 2018 +//@ compile-flags: -Copt-level=1 async fn c(x: u8) -> u8 { if x == 8 { diff --git a/tests/coverage/async2.coverage b/tests/coverage/async2.coverage index a69eefe72cbc..bd5b701491b5 100644 --- a/tests/coverage/async2.coverage +++ b/tests/coverage/async2.coverage @@ -1,6 +1,6 @@ LL| |#![feature(coverage_attribute)] LL| |#![feature(noop_waker)] - LL| |// edition: 2018 + LL| |//@ edition: 2018 LL| | LL| 1|fn non_async_func() { LL| 1| println!("non_async_func was covered"); diff --git a/tests/coverage/async2.rs b/tests/coverage/async2.rs index ae83f0103e64..713c70d277a7 100644 --- a/tests/coverage/async2.rs +++ b/tests/coverage/async2.rs @@ -1,6 +1,6 @@ #![feature(coverage_attribute)] #![feature(noop_waker)] -// edition: 2018 +//@ edition: 2018 fn non_async_func() { println!("non_async_func was covered"); diff --git a/tests/coverage/async_block.coverage b/tests/coverage/async_block.coverage index 0e24b80124f4..7fd17bc51c3e 100644 --- a/tests/coverage/async_block.coverage +++ b/tests/coverage/async_block.coverage @@ -1,6 +1,6 @@ LL| |#![feature(coverage_attribute)] LL| |#![feature(noop_waker)] - LL| |// edition: 2021 + LL| |//@ edition: 2021 LL| | LL| 1|fn main() { LL| 17| for i in 0..16 { diff --git a/tests/coverage/async_block.rs b/tests/coverage/async_block.rs index f94bcfe31937..a70dd7470327 100644 --- a/tests/coverage/async_block.rs +++ b/tests/coverage/async_block.rs @@ -1,6 +1,6 @@ #![feature(coverage_attribute)] #![feature(noop_waker)] -// edition: 2021 +//@ edition: 2021 fn main() { for i in 0..16 { diff --git a/tests/coverage/auxiliary/inline_always_with_dead_code.rs b/tests/coverage/auxiliary/inline_always_with_dead_code.rs index 9dc50dae25ae..99ba5e743689 100644 --- a/tests/coverage/auxiliary/inline_always_with_dead_code.rs +++ b/tests/coverage/auxiliary/inline_always_with_dead_code.rs @@ -1,4 +1,4 @@ -// compile-flags: -Cinstrument-coverage -Ccodegen-units=4 -Copt-level=0 +//@ compile-flags: -Cinstrument-coverage -Ccodegen-units=4 -Copt-level=0 #![allow(dead_code)] diff --git a/tests/coverage/auxiliary/macro_name_span_helper.rs b/tests/coverage/auxiliary/macro_name_span_helper.rs index 6797c081d938..ff1e4a9fca1d 100644 --- a/tests/coverage/auxiliary/macro_name_span_helper.rs +++ b/tests/coverage/auxiliary/macro_name_span_helper.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 #[macro_export] macro_rules! macro_that_defines_a_function { diff --git a/tests/coverage/auxiliary/used_crate.rs b/tests/coverage/auxiliary/used_crate.rs index c086ef21e1a9..22837ef6d3cb 100644 --- a/tests/coverage/auxiliary/used_crate.rs +++ b/tests/coverage/auxiliary/used_crate.rs @@ -1,6 +1,6 @@ #![allow(unused_assignments, unused_variables)] // Verify that coverage works with optimizations: -// compile-flags: -C opt-level=3 +//@ compile-flags: -C opt-level=3 use std::fmt::Debug; diff --git a/tests/coverage/auxiliary/used_inline_crate.rs b/tests/coverage/auxiliary/used_inline_crate.rs index e8929de6b360..d5fe7478aa41 100644 --- a/tests/coverage/auxiliary/used_inline_crate.rs +++ b/tests/coverage/auxiliary/used_inline_crate.rs @@ -1,6 +1,6 @@ #![allow(unused_assignments, unused_variables)] // Verify that coverage works with optimizations: -// compile-flags: -C opt-level=3 +//@ compile-flags: -C opt-level=3 use std::fmt::Debug; diff --git a/tests/coverage/bad_counter_ids.coverage b/tests/coverage/bad_counter_ids.coverage index 39e6cae11dda..f6c69913cdd2 100644 --- a/tests/coverage/bad_counter_ids.coverage +++ b/tests/coverage/bad_counter_ids.coverage @@ -1,6 +1,6 @@ LL| |#![feature(coverage_attribute)] - LL| |// edition: 2021 - LL| |// compile-flags: -Copt-level=0 -Zmir-opt-level=3 + LL| |//@ edition: 2021 + LL| |//@ compile-flags: -Copt-level=0 -Zmir-opt-level=3 LL| | LL| |// Regression test for . LL| |// diff --git a/tests/coverage/bad_counter_ids.rs b/tests/coverage/bad_counter_ids.rs index e22b96468abd..ef31d682e4f1 100644 --- a/tests/coverage/bad_counter_ids.rs +++ b/tests/coverage/bad_counter_ids.rs @@ -1,6 +1,6 @@ #![feature(coverage_attribute)] -// edition: 2021 -// compile-flags: -Copt-level=0 -Zmir-opt-level=3 +//@ edition: 2021 +//@ compile-flags: -Copt-level=0 -Zmir-opt-level=3 // Regression test for . // diff --git a/tests/coverage/bench.coverage b/tests/coverage/bench.coverage index 64945dc64150..aed780a959cf 100644 --- a/tests/coverage/bench.coverage +++ b/tests/coverage/bench.coverage @@ -1,6 +1,6 @@ LL| |#![feature(test)] - LL| |// edition: 2021 - LL| |// compile-flags: --test + LL| |//@ edition: 2021 + LL| |//@ compile-flags: --test LL| | LL| |extern crate test; LL| | diff --git a/tests/coverage/bench.rs b/tests/coverage/bench.rs index 2dcd7355b2f7..b1aa42aabd7f 100644 --- a/tests/coverage/bench.rs +++ b/tests/coverage/bench.rs @@ -1,6 +1,6 @@ #![feature(test)] -// edition: 2021 -// compile-flags: --test +//@ edition: 2021 +//@ compile-flags: --test extern crate test; diff --git a/tests/coverage/closure.coverage b/tests/coverage/closure.coverage index 58224eeaf626..2f040b39f88a 100644 --- a/tests/coverage/closure.coverage +++ b/tests/coverage/closure.coverage @@ -1,5 +1,5 @@ LL| |#![allow(unused_assignments, unused_variables)] - LL| |// compile-flags: -C opt-level=2 + LL| |//@ compile-flags: -C opt-level=2 LL| | LL| |// This test used to be sensitive to certain coverage-specific hacks in LL| |// `rustc_middle/mir/mono.rs`, but those hacks were later cleaned up by diff --git a/tests/coverage/closure.rs b/tests/coverage/closure.rs index 4be78062f3f5..1e433b61a6c3 100644 --- a/tests/coverage/closure.rs +++ b/tests/coverage/closure.rs @@ -1,5 +1,5 @@ #![allow(unused_assignments, unused_variables)] -// compile-flags: -C opt-level=2 +//@ compile-flags: -C opt-level=2 // This test used to be sensitive to certain coverage-specific hacks in // `rustc_middle/mir/mono.rs`, but those hacks were later cleaned up by diff --git a/tests/coverage/closure_macro.coverage b/tests/coverage/closure_macro.coverage index 716d75cb8d75..00022bbff89f 100644 --- a/tests/coverage/closure_macro.coverage +++ b/tests/coverage/closure_macro.coverage @@ -1,4 +1,4 @@ - LL| |// edition: 2018 + LL| |//@ edition: 2018 LL| | LL| |macro_rules! bail { LL| | ($msg:literal $(,)?) => { diff --git a/tests/coverage/closure_macro.rs b/tests/coverage/closure_macro.rs index 6fe1212de8d0..8b6ca4819144 100644 --- a/tests/coverage/closure_macro.rs +++ b/tests/coverage/closure_macro.rs @@ -1,4 +1,4 @@ -// edition: 2018 +//@ edition: 2018 macro_rules! bail { ($msg:literal $(,)?) => { diff --git a/tests/coverage/closure_macro_async.coverage b/tests/coverage/closure_macro_async.coverage index 1032e027cd97..0557ce47d687 100644 --- a/tests/coverage/closure_macro_async.coverage +++ b/tests/coverage/closure_macro_async.coverage @@ -1,6 +1,6 @@ LL| |#![feature(coverage_attribute)] LL| |#![feature(noop_waker)] - LL| |// edition: 2018 + LL| |//@ edition: 2018 LL| | LL| |macro_rules! bail { LL| | ($msg:literal $(,)?) => { diff --git a/tests/coverage/closure_macro_async.rs b/tests/coverage/closure_macro_async.rs index db656fca1983..735214629b6f 100644 --- a/tests/coverage/closure_macro_async.rs +++ b/tests/coverage/closure_macro_async.rs @@ -1,6 +1,6 @@ #![feature(coverage_attribute)] #![feature(noop_waker)] -// edition: 2018 +//@ edition: 2018 macro_rules! bail { ($msg:literal $(,)?) => { diff --git a/tests/coverage/closure_unit_return.coverage b/tests/coverage/closure_unit_return.coverage index 1056baa385cb..5e57e0db1600 100644 --- a/tests/coverage/closure_unit_return.coverage +++ b/tests/coverage/closure_unit_return.coverage @@ -1,5 +1,5 @@ LL| |#![feature(coverage_attribute)] - LL| |// edition: 2021 + LL| |//@ edition: 2021 LL| | LL| |// Regression test for an inconsistency between functions that return the value LL| |// of their trailing expression, and functions that implicitly return `()`. diff --git a/tests/coverage/closure_unit_return.rs b/tests/coverage/closure_unit_return.rs index d2b4ab8bd9ff..d4f139dd363b 100644 --- a/tests/coverage/closure_unit_return.rs +++ b/tests/coverage/closure_unit_return.rs @@ -1,5 +1,5 @@ #![feature(coverage_attribute)] -// edition: 2021 +//@ edition: 2021 // Regression test for an inconsistency between functions that return the value // of their trailing expression, and functions that implicitly return `()`. diff --git a/tests/coverage/color.coverage b/tests/coverage/color.coverage index bc49fff9cb75..b12f20204b4f 100644 --- a/tests/coverage/color.coverage +++ b/tests/coverage/color.coverage @@ -1,7 +1,7 @@ - LL| |// edition: 2021 - LL| |// ignore-mode-coverage-map - LL| |// ignore-windows - LL| |// llvm-cov-flags: --use-color + LL| |//@ edition: 2021 + LL| |//@ ignore-mode-coverage-map + LL| |//@ ignore-windows + LL| |//@ llvm-cov-flags: --use-color LL| | LL| |// Verify that telling `llvm-cov` to use colored output actually works. LL| |// Ignored on Windows because we can't tell the tool to use ANSI escapes. diff --git a/tests/coverage/color.rs b/tests/coverage/color.rs index bd727946c781..144e798ba5d7 100644 --- a/tests/coverage/color.rs +++ b/tests/coverage/color.rs @@ -1,7 +1,7 @@ -// edition: 2021 -// ignore-mode-coverage-map -// ignore-windows -// llvm-cov-flags: --use-color +//@ edition: 2021 +//@ ignore-mode-coverage-map +//@ ignore-windows +//@ llvm-cov-flags: --use-color // Verify that telling `llvm-cov` to use colored output actually works. // Ignored on Windows because we can't tell the tool to use ANSI escapes. diff --git a/tests/coverage/coverage_attr_closure.coverage b/tests/coverage/coverage_attr_closure.coverage index 3474ad65063e..7bdb96bdab85 100644 --- a/tests/coverage/coverage_attr_closure.coverage +++ b/tests/coverage/coverage_attr_closure.coverage @@ -1,6 +1,6 @@ LL| |#![feature(coverage_attribute, stmt_expr_attributes)] LL| |#![allow(dead_code)] - LL| |// edition: 2021 + LL| |//@ edition: 2021 LL| | LL| |static GLOBAL_CLOSURE_ON: fn(&str) = #[coverage(on)] LL| 0||input: &str| { diff --git a/tests/coverage/coverage_attr_closure.rs b/tests/coverage/coverage_attr_closure.rs index 1904c89c9204..4341a868ab84 100644 --- a/tests/coverage/coverage_attr_closure.rs +++ b/tests/coverage/coverage_attr_closure.rs @@ -1,6 +1,6 @@ #![feature(coverage_attribute, stmt_expr_attributes)] #![allow(dead_code)] -// edition: 2021 +//@ edition: 2021 static GLOBAL_CLOSURE_ON: fn(&str) = #[coverage(on)] |input: &str| { diff --git a/tests/coverage/drop_trait.coverage b/tests/coverage/drop_trait.coverage index 2c9439a93b12..85d557573cf3 100644 --- a/tests/coverage/drop_trait.coverage +++ b/tests/coverage/drop_trait.coverage @@ -1,5 +1,5 @@ LL| |#![allow(unused_assignments)] - LL| |// failure-status: 1 + LL| |//@ failure-status: 1 LL| | LL| |struct Firework { LL| | strength: i32, diff --git a/tests/coverage/drop_trait.rs b/tests/coverage/drop_trait.rs index 7b062719c6b0..5a723eb9e833 100644 --- a/tests/coverage/drop_trait.rs +++ b/tests/coverage/drop_trait.rs @@ -1,5 +1,5 @@ #![allow(unused_assignments)] -// failure-status: 1 +//@ failure-status: 1 struct Firework { strength: i32, diff --git a/tests/coverage/fn_sig_into_try.coverage b/tests/coverage/fn_sig_into_try.coverage index aac5c9d9a94e..cabe747ce5ac 100644 --- a/tests/coverage/fn_sig_into_try.coverage +++ b/tests/coverage/fn_sig_into_try.coverage @@ -1,5 +1,5 @@ LL| |#![feature(coverage_attribute)] - LL| |// edition: 2021 + LL| |//@ edition: 2021 LL| | LL| |// Regression test for inconsistent handling of function signature spans that LL| |// are followed by code using the `?` operator. diff --git a/tests/coverage/fn_sig_into_try.rs b/tests/coverage/fn_sig_into_try.rs index 5d8e7929ef97..cda5e716edf5 100644 --- a/tests/coverage/fn_sig_into_try.rs +++ b/tests/coverage/fn_sig_into_try.rs @@ -1,5 +1,5 @@ #![feature(coverage_attribute)] -// edition: 2021 +//@ edition: 2021 // Regression test for inconsistent handling of function signature spans that // are followed by code using the `?` operator. diff --git a/tests/coverage/generics.coverage b/tests/coverage/generics.coverage index c68c0be80b15..a2cd1465d26f 100644 --- a/tests/coverage/generics.coverage +++ b/tests/coverage/generics.coverage @@ -1,5 +1,5 @@ LL| |#![allow(unused_assignments)] - LL| |// failure-status: 1 + LL| |//@ failure-status: 1 LL| | LL| |struct Firework { LL| | strength: T, diff --git a/tests/coverage/generics.rs b/tests/coverage/generics.rs index fd3811b6937b..acfbd6a90836 100644 --- a/tests/coverage/generics.rs +++ b/tests/coverage/generics.rs @@ -1,5 +1,5 @@ #![allow(unused_assignments)] -// failure-status: 1 +//@ failure-status: 1 struct Firework { strength: T, diff --git a/tests/coverage/if_not.coverage b/tests/coverage/if_not.coverage index 86ff7fc4f07d..678ccf9f2f85 100644 --- a/tests/coverage/if_not.coverage +++ b/tests/coverage/if_not.coverage @@ -1,5 +1,5 @@ LL| |#![feature(coverage_attribute)] - LL| |// edition: 2021 + LL| |//@ edition: 2021 LL| | LL| |#[rustfmt::skip] LL| 12|fn if_not(cond: bool) { diff --git a/tests/coverage/if_not.rs b/tests/coverage/if_not.rs index 7b166662b5d0..69283ef2527d 100644 --- a/tests/coverage/if_not.rs +++ b/tests/coverage/if_not.rs @@ -1,5 +1,5 @@ #![feature(coverage_attribute)] -// edition: 2021 +//@ edition: 2021 #[rustfmt::skip] fn if_not(cond: bool) { diff --git a/tests/coverage/ignore_map.coverage b/tests/coverage/ignore_map.coverage index 04bcb5bec6ec..a796a7375a76 100644 --- a/tests/coverage/ignore_map.coverage +++ b/tests/coverage/ignore_map.coverage @@ -1,4 +1,4 @@ - LL| |// ignore-mode-coverage-map + LL| |//@ ignore-mode-coverage-map LL| | LL| 1|fn main() {} diff --git a/tests/coverage/ignore_map.rs b/tests/coverage/ignore_map.rs index 71b82e8fc9de..deee6e27d99b 100644 --- a/tests/coverage/ignore_map.rs +++ b/tests/coverage/ignore_map.rs @@ -1,3 +1,3 @@ -// ignore-mode-coverage-map +//@ ignore-mode-coverage-map fn main() {} diff --git a/tests/coverage/ignore_run.rs b/tests/coverage/ignore_run.rs index 87108867a057..0363524d369d 100644 --- a/tests/coverage/ignore_run.rs +++ b/tests/coverage/ignore_run.rs @@ -1,3 +1,3 @@ -// ignore-mode-coverage-run +//@ ignore-mode-coverage-run fn main() {} diff --git a/tests/coverage/inline-dead.coverage b/tests/coverage/inline-dead.coverage index a643332bce1f..a2d24fd2f6a6 100644 --- a/tests/coverage/inline-dead.coverage +++ b/tests/coverage/inline-dead.coverage @@ -1,5 +1,5 @@ LL| |// Regression test for issue #98833. - LL| |// compile-flags: -Zinline-mir -Cdebug-assertions=off + LL| |//@ compile-flags: -Zinline-mir -Cdebug-assertions=off LL| | LL| 1|fn main() { LL| 1| println!("{}", live::()); diff --git a/tests/coverage/inline-dead.rs b/tests/coverage/inline-dead.rs index a854c17f6d59..327e68c60bb7 100644 --- a/tests/coverage/inline-dead.rs +++ b/tests/coverage/inline-dead.rs @@ -1,5 +1,5 @@ // Regression test for issue #98833. -// compile-flags: -Zinline-mir -Cdebug-assertions=off +//@ compile-flags: -Zinline-mir -Cdebug-assertions=off fn main() { println!("{}", live::()); diff --git a/tests/coverage/inline.coverage b/tests/coverage/inline.coverage index 68a2e408306d..3d322126a38b 100644 --- a/tests/coverage/inline.coverage +++ b/tests/coverage/inline.coverage @@ -1,4 +1,4 @@ - LL| |// compile-flags: -Zinline-mir + LL| |//@ compile-flags: -Zinline-mir LL| | LL| |use std::fmt::Display; LL| | diff --git a/tests/coverage/inline.rs b/tests/coverage/inline.rs index 9cfab9ddbadf..04a308ea5dd9 100644 --- a/tests/coverage/inline.rs +++ b/tests/coverage/inline.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zinline-mir +//@ compile-flags: -Zinline-mir use std::fmt::Display; diff --git a/tests/coverage/issue-84561.coverage b/tests/coverage/issue-84561.coverage index 90a2d069d394..2a642e2427b9 100644 --- a/tests/coverage/issue-84561.coverage +++ b/tests/coverage/issue-84561.coverage @@ -1,6 +1,6 @@ LL| |// This demonstrated Issue #84561: function-like macros produce unintuitive coverage results. LL| | - LL| |// failure-status: 101 + LL| |//@ failure-status: 101 LL| |#[derive(PartialEq, Eq)] LL| |struct Foo(u32); LL| | diff --git a/tests/coverage/issue-84561.rs b/tests/coverage/issue-84561.rs index 9c218a37e6c4..517c045a031f 100644 --- a/tests/coverage/issue-84561.rs +++ b/tests/coverage/issue-84561.rs @@ -1,6 +1,6 @@ // This demonstrated Issue #84561: function-like macros produce unintuitive coverage results. -// failure-status: 101 +//@ failure-status: 101 #[derive(PartialEq, Eq)] struct Foo(u32); diff --git a/tests/coverage/issue-85461.coverage b/tests/coverage/issue-85461.coverage index cbc910664d06..0a9cc78c2eeb 100644 --- a/tests/coverage/issue-85461.coverage +++ b/tests/coverage/issue-85461.coverage @@ -1,5 +1,5 @@ $DIR/auxiliary/inline_always_with_dead_code.rs: - LL| |// compile-flags: -Cinstrument-coverage -Ccodegen-units=4 -Copt-level=0 + LL| |//@ compile-flags: -Cinstrument-coverage -Ccodegen-units=4 -Copt-level=0 LL| | LL| |#![allow(dead_code)] LL| | @@ -25,7 +25,7 @@ $DIR/auxiliary/inline_always_with_dead_code.rs: $DIR/issue-85461.rs: LL| |// Regression test for #85461: MSVC sometimes fail to link with dead code and #[inline(always)] LL| | - LL| |// aux-build:inline_always_with_dead_code.rs + LL| |//@ aux-build:inline_always_with_dead_code.rs LL| |extern crate inline_always_with_dead_code; LL| | LL| |use inline_always_with_dead_code::{bar, baz}; diff --git a/tests/coverage/issue-85461.rs b/tests/coverage/issue-85461.rs index 9d4c90a827ee..4d8ea77ad9ce 100644 --- a/tests/coverage/issue-85461.rs +++ b/tests/coverage/issue-85461.rs @@ -1,6 +1,6 @@ // Regression test for #85461: MSVC sometimes fail to link with dead code and #[inline(always)] -// aux-build:inline_always_with_dead_code.rs +//@ aux-build:inline_always_with_dead_code.rs extern crate inline_always_with_dead_code; use inline_always_with_dead_code::{bar, baz}; diff --git a/tests/coverage/issue-93054.coverage b/tests/coverage/issue-93054.coverage index 6ae8ffb5cb4f..c3068cf428bf 100644 --- a/tests/coverage/issue-93054.coverage +++ b/tests/coverage/issue-93054.coverage @@ -1,5 +1,5 @@ LL| |#![allow(dead_code, unreachable_code)] - LL| |// edition: 2021 + LL| |//@ edition: 2021 LL| | LL| |// Regression test for #93054: Functions using uninhabited types often only have a single, LL| |// unreachable basic block which doesn't get instrumented. This should not cause llvm-cov to fail. diff --git a/tests/coverage/issue-93054.rs b/tests/coverage/issue-93054.rs index f16fc1e42396..12313cd16cf0 100644 --- a/tests/coverage/issue-93054.rs +++ b/tests/coverage/issue-93054.rs @@ -1,5 +1,5 @@ #![allow(dead_code, unreachable_code)] -// edition: 2021 +//@ edition: 2021 // Regression test for #93054: Functions using uninhabited types often only have a single, // unreachable basic block which doesn't get instrumented. This should not cause llvm-cov to fail. diff --git a/tests/coverage/long_and_wide.coverage b/tests/coverage/long_and_wide.coverage index cf4dd2811406..f0898d9f4662 100644 --- a/tests/coverage/long_and_wide.coverage +++ b/tests/coverage/long_and_wide.coverage @@ -1,4 +1,4 @@ - LL| |// edition: 2021 + LL| |//@ edition: 2021 LL| |// ignore-tidy-linelength LL| | LL| |// This file deliberately contains line and column numbers larger than 127, diff --git a/tests/coverage/long_and_wide.rs b/tests/coverage/long_and_wide.rs index 87f2207bd7e6..58dfdd0b20ab 100644 --- a/tests/coverage/long_and_wide.rs +++ b/tests/coverage/long_and_wide.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 // ignore-tidy-linelength // This file deliberately contains line and column numbers larger than 127, diff --git a/tests/coverage/macro_in_closure.coverage b/tests/coverage/macro_in_closure.coverage index 7f6f873439df..a23ad2c37ec2 100644 --- a/tests/coverage/macro_in_closure.coverage +++ b/tests/coverage/macro_in_closure.coverage @@ -1,5 +1,5 @@ LL| |#![feature(coverage_attribute)] - LL| |// edition: 2021 + LL| |//@ edition: 2021 LL| | LL| |// If a closure body consists entirely of a single bang-macro invocation, the LL| |// body span ends up inside the macro-expansion, so we need to un-expand it diff --git a/tests/coverage/macro_in_closure.rs b/tests/coverage/macro_in_closure.rs index 6948c9079c09..3d62b54073f1 100644 --- a/tests/coverage/macro_in_closure.rs +++ b/tests/coverage/macro_in_closure.rs @@ -1,5 +1,5 @@ #![feature(coverage_attribute)] -// edition: 2021 +//@ edition: 2021 // If a closure body consists entirely of a single bang-macro invocation, the // body span ends up inside the macro-expansion, so we need to un-expand it diff --git a/tests/coverage/macro_name_span.coverage b/tests/coverage/macro_name_span.coverage index 0e12ce4a27ca..b9a7ede0b4d4 100644 --- a/tests/coverage/macro_name_span.coverage +++ b/tests/coverage/macro_name_span.coverage @@ -1,11 +1,11 @@ - LL| |// edition: 2021 + LL| |//@ edition: 2021 LL| | LL| |// Regression test for . LL| |// Under some circumstances, the heuristics that detect macro name spans can LL| |// get confused and produce incorrect spans beyond the bounds of the span LL| |// being processed. LL| | - LL| |// aux-build: macro_name_span_helper.rs + LL| |//@ aux-build: macro_name_span_helper.rs LL| |extern crate macro_name_span_helper; LL| | LL| 1|fn main() { diff --git a/tests/coverage/macro_name_span.rs b/tests/coverage/macro_name_span.rs index 5d15977c498f..178c7ded9626 100644 --- a/tests/coverage/macro_name_span.rs +++ b/tests/coverage/macro_name_span.rs @@ -1,11 +1,11 @@ -// edition: 2021 +//@ edition: 2021 // Regression test for . // Under some circumstances, the heuristics that detect macro name spans can // get confused and produce incorrect spans beyond the bounds of the span // being processed. -// aux-build: macro_name_span_helper.rs +//@ aux-build: macro_name_span_helper.rs extern crate macro_name_span_helper; fn main() { diff --git a/tests/coverage/no_spans.coverage b/tests/coverage/no_spans.coverage index b117c32ffd0d..19e8c2fe5b6b 100644 --- a/tests/coverage/no_spans.coverage +++ b/tests/coverage/no_spans.coverage @@ -1,5 +1,5 @@ LL| |#![feature(coverage_attribute)] - LL| |// edition: 2021 + LL| |//@ edition: 2021 LL| | LL| |// If the span extractor can't find any relevant spans for a function, the LL| |// refinement loop will terminate with nothing in its `prev` slot. If the diff --git a/tests/coverage/no_spans.rs b/tests/coverage/no_spans.rs index a5234bc6b60d..e5312406f8a1 100644 --- a/tests/coverage/no_spans.rs +++ b/tests/coverage/no_spans.rs @@ -1,5 +1,5 @@ #![feature(coverage_attribute)] -// edition: 2021 +//@ edition: 2021 // If the span extractor can't find any relevant spans for a function, the // refinement loop will terminate with nothing in its `prev` slot. If the diff --git a/tests/coverage/no_spans_if_not.coverage b/tests/coverage/no_spans_if_not.coverage index d235568db654..b5606c9043c3 100644 --- a/tests/coverage/no_spans_if_not.coverage +++ b/tests/coverage/no_spans_if_not.coverage @@ -1,4 +1,4 @@ - LL| |// edition: 2021 + LL| |//@ edition: 2021 LL| | LL| |// If the span extractor can't find any relevant spans for a function, LL| |// but the function contains coverage span-marker statements (e.g. inserted diff --git a/tests/coverage/no_spans_if_not.rs b/tests/coverage/no_spans_if_not.rs index 2bbdc11cd5e5..3e7c13808fbb 100644 --- a/tests/coverage/no_spans_if_not.rs +++ b/tests/coverage/no_spans_if_not.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 // If the span extractor can't find any relevant spans for a function, // but the function contains coverage span-marker statements (e.g. inserted diff --git a/tests/coverage/overflow.coverage b/tests/coverage/overflow.coverage index 4f8dffc0c481..9057c244ccf0 100644 --- a/tests/coverage/overflow.coverage +++ b/tests/coverage/overflow.coverage @@ -1,6 +1,6 @@ LL| |#![allow(unused_assignments)] - LL| |// compile-flags: -Coverflow-checks=yes - LL| |// failure-status: 101 + LL| |//@ compile-flags: -Coverflow-checks=yes + LL| |//@ failure-status: 101 LL| | LL| 4|fn might_overflow(to_add: u32) -> u32 { LL| 4| if to_add > 5 { diff --git a/tests/coverage/overflow.rs b/tests/coverage/overflow.rs index 1c40771b2747..526728c087fe 100644 --- a/tests/coverage/overflow.rs +++ b/tests/coverage/overflow.rs @@ -1,6 +1,6 @@ #![allow(unused_assignments)] -// compile-flags: -Coverflow-checks=yes -// failure-status: 101 +//@ compile-flags: -Coverflow-checks=yes +//@ failure-status: 101 fn might_overflow(to_add: u32) -> u32 { if to_add > 5 { diff --git a/tests/coverage/panic_unwind.coverage b/tests/coverage/panic_unwind.coverage index 2b0777ef215d..eaf96cb02896 100644 --- a/tests/coverage/panic_unwind.coverage +++ b/tests/coverage/panic_unwind.coverage @@ -1,5 +1,5 @@ LL| |#![allow(unused_assignments)] - LL| |// failure-status: 101 + LL| |//@ failure-status: 101 LL| | LL| 4|fn might_panic(should_panic: bool) { LL| 4| if should_panic { diff --git a/tests/coverage/panic_unwind.rs b/tests/coverage/panic_unwind.rs index 638d2eb6aaaf..1d230565e410 100644 --- a/tests/coverage/panic_unwind.rs +++ b/tests/coverage/panic_unwind.rs @@ -1,5 +1,5 @@ #![allow(unused_assignments)] -// failure-status: 101 +//@ failure-status: 101 fn might_panic(should_panic: bool) { if should_panic { diff --git a/tests/coverage/sort_groups.coverage b/tests/coverage/sort_groups.coverage index 77cbb09c74a7..33a4d9546ce9 100644 --- a/tests/coverage/sort_groups.coverage +++ b/tests/coverage/sort_groups.coverage @@ -1,4 +1,4 @@ - LL| |// edition: 2021 + LL| |//@ edition: 2021 LL| | LL| |// Demonstrate that `sort_subviews.py` can sort instantiation groups into a LL| |// predictable order, while preserving their heterogeneous contents. diff --git a/tests/coverage/sort_groups.rs b/tests/coverage/sort_groups.rs index 17fd862ca2ca..6bd861b764bf 100644 --- a/tests/coverage/sort_groups.rs +++ b/tests/coverage/sort_groups.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 // Demonstrate that `sort_subviews.py` can sort instantiation groups into a // predictable order, while preserving their heterogeneous contents. diff --git a/tests/coverage/test_harness.coverage b/tests/coverage/test_harness.coverage index c3f660506fbd..22b1a3938f05 100644 --- a/tests/coverage/test_harness.coverage +++ b/tests/coverage/test_harness.coverage @@ -1,7 +1,7 @@ LL| |// Verify that the entry point injected by the test harness doesn't cause LL| |// weird artifacts in the coverage report (e.g. issue #10749). LL| | - LL| |// compile-flags: --test + LL| |//@ compile-flags: --test LL| | LL| |#[allow(dead_code)] LL| 0|fn unused() {} diff --git a/tests/coverage/test_harness.rs b/tests/coverage/test_harness.rs index 12a755734c19..1361274b716d 100644 --- a/tests/coverage/test_harness.rs +++ b/tests/coverage/test_harness.rs @@ -1,7 +1,7 @@ // Verify that the entry point injected by the test harness doesn't cause // weird artifacts in the coverage report (e.g. issue #10749). -// compile-flags: --test +//@ compile-flags: --test #[allow(dead_code)] fn unused() {} diff --git a/tests/coverage/thin-lto.coverage b/tests/coverage/thin-lto.coverage index 7ece467217ac..5255aa7f5a40 100644 --- a/tests/coverage/thin-lto.coverage +++ b/tests/coverage/thin-lto.coverage @@ -1,4 +1,4 @@ - LL| |// compile-flags: -O -C lto=thin -C prefer-dynamic=no + LL| |//@ compile-flags: -O -C lto=thin -C prefer-dynamic=no LL| | LL| 1|pub fn main() {} diff --git a/tests/coverage/thin-lto.rs b/tests/coverage/thin-lto.rs index 04e9cd0e8088..08843ea32ee1 100644 --- a/tests/coverage/thin-lto.rs +++ b/tests/coverage/thin-lto.rs @@ -1,3 +1,3 @@ -// compile-flags: -O -C lto=thin -C prefer-dynamic=no +//@ compile-flags: -O -C lto=thin -C prefer-dynamic=no pub fn main() {} diff --git a/tests/coverage/trivial.coverage b/tests/coverage/trivial.coverage index af4be7b8f335..9e425bd59305 100644 --- a/tests/coverage/trivial.coverage +++ b/tests/coverage/trivial.coverage @@ -1,4 +1,4 @@ - LL| |// edition: 2021 + LL| |//@ edition: 2021 LL| | LL| 1|fn main() {} diff --git a/tests/coverage/trivial.rs b/tests/coverage/trivial.rs index 782472739a00..7f5001d1eec0 100644 --- a/tests/coverage/trivial.rs +++ b/tests/coverage/trivial.rs @@ -1,3 +1,3 @@ -// edition: 2021 +//@ edition: 2021 fn main() {} diff --git a/tests/coverage/try_error_result.coverage b/tests/coverage/try_error_result.coverage index 418efa7fcb5c..6fbe8b8db13f 100644 --- a/tests/coverage/try_error_result.coverage +++ b/tests/coverage/try_error_result.coverage @@ -1,5 +1,5 @@ LL| |#![allow(unused_assignments)] - LL| |// failure-status: 1 + LL| |//@ failure-status: 1 LL| | LL| 6|fn call(return_error: bool) -> Result<(), ()> { LL| 6| if return_error { diff --git a/tests/coverage/try_error_result.rs b/tests/coverage/try_error_result.rs index 1acc26169123..f36283c34c8b 100644 --- a/tests/coverage/try_error_result.rs +++ b/tests/coverage/try_error_result.rs @@ -1,5 +1,5 @@ #![allow(unused_assignments)] -// failure-status: 1 +//@ failure-status: 1 fn call(return_error: bool) -> Result<(), ()> { if return_error { diff --git a/tests/coverage/unicode.coverage b/tests/coverage/unicode.coverage index af586111ba34..305591c70625 100644 --- a/tests/coverage/unicode.coverage +++ b/tests/coverage/unicode.coverage @@ -1,6 +1,6 @@ - LL| |// edition: 2021 - LL| |// ignore-windows - we can't force `llvm-cov` to use ANSI escapes on Windows - LL| |// llvm-cov-flags: --use-color + LL| |//@ edition: 2021 + LL| |//@ ignore-windows - we can't force `llvm-cov` to use ANSI escapes on Windows + LL| |//@ llvm-cov-flags: --use-color LL| | LL| |// Check that column numbers are denoted in bytes, so that they don't cause LL| |// `llvm-cov` to fail or emit malformed output. diff --git a/tests/coverage/unicode.rs b/tests/coverage/unicode.rs index dfc5ea69dd23..dc02d2c8ab4e 100644 --- a/tests/coverage/unicode.rs +++ b/tests/coverage/unicode.rs @@ -1,6 +1,6 @@ -// edition: 2021 -// ignore-windows - we can't force `llvm-cov` to use ANSI escapes on Windows -// llvm-cov-flags: --use-color +//@ edition: 2021 +//@ ignore-windows - we can't force `llvm-cov` to use ANSI escapes on Windows +//@ llvm-cov-flags: --use-color // Check that column numbers are denoted in bytes, so that they don't cause // `llvm-cov` to fail or emit malformed output. diff --git a/tests/coverage/unreachable.coverage b/tests/coverage/unreachable.coverage index a58765f688be..fdb6d3616d9a 100644 --- a/tests/coverage/unreachable.coverage +++ b/tests/coverage/unreachable.coverage @@ -1,6 +1,6 @@ LL| |#![feature(core_intrinsics)] LL| |#![feature(coverage_attribute)] - LL| |// edition: 2021 + LL| |//@ edition: 2021 LL| | LL| |// LL| |// If we instrument a function for coverage, but all of its counter-increment diff --git a/tests/coverage/unreachable.rs b/tests/coverage/unreachable.rs index 6d0c7b3ca8db..0e05c1d11be4 100644 --- a/tests/coverage/unreachable.rs +++ b/tests/coverage/unreachable.rs @@ -1,6 +1,6 @@ #![feature(core_intrinsics)] #![feature(coverage_attribute)] -// edition: 2021 +//@ edition: 2021 // // If we instrument a function for coverage, but all of its counter-increment diff --git a/tests/coverage/uses_crate.coverage b/tests/coverage/uses_crate.coverage index 50d92102a109..3ab47dbca79c 100644 --- a/tests/coverage/uses_crate.coverage +++ b/tests/coverage/uses_crate.coverage @@ -1,7 +1,7 @@ $DIR/auxiliary/used_crate.rs: LL| |#![allow(unused_assignments, unused_variables)] LL| |// Verify that coverage works with optimizations: - LL| |// compile-flags: -C opt-level=3 + LL| |//@ compile-flags: -C opt-level=3 LL| | LL| |use std::fmt::Debug; LL| | @@ -155,11 +155,11 @@ $DIR/uses_crate.rs: LL| |// the unused functions not instrumented, but it seems to be fine now. LL| | LL| |// Validates coverage now works with optimizations - LL| |// compile-flags: -C opt-level=3 + LL| |//@ compile-flags: -C opt-level=3 LL| | LL| |#![allow(unused_assignments, unused_variables)] LL| | - LL| |// aux-build:used_crate.rs + LL| |//@ aux-build:used_crate.rs LL| |extern crate used_crate; LL| | LL| 1|fn main() { diff --git a/tests/coverage/uses_crate.rs b/tests/coverage/uses_crate.rs index ab203ad781d6..12a53ac7278d 100644 --- a/tests/coverage/uses_crate.rs +++ b/tests/coverage/uses_crate.rs @@ -2,11 +2,11 @@ // the unused functions not instrumented, but it seems to be fine now. // Validates coverage now works with optimizations -// compile-flags: -C opt-level=3 +//@ compile-flags: -C opt-level=3 #![allow(unused_assignments, unused_variables)] -// aux-build:used_crate.rs +//@ aux-build:used_crate.rs extern crate used_crate; fn main() { diff --git a/tests/coverage/uses_inline_crate.coverage b/tests/coverage/uses_inline_crate.coverage index cc0e01ffde1c..0c9735990c7e 100644 --- a/tests/coverage/uses_inline_crate.coverage +++ b/tests/coverage/uses_inline_crate.coverage @@ -1,7 +1,7 @@ $DIR/auxiliary/used_inline_crate.rs: LL| |#![allow(unused_assignments, unused_variables)] LL| |// Verify that coverage works with optimizations: - LL| |// compile-flags: -C opt-level=3 + LL| |//@ compile-flags: -C opt-level=3 LL| | LL| |use std::fmt::Debug; LL| | @@ -138,11 +138,11 @@ $DIR/uses_inline_crate.rs: LL| |// the unused functions not instrumented, but it seems to be fine now. LL| | LL| |// Validates coverage now works with optimizations - LL| |// compile-flags: -C opt-level=3 + LL| |//@ compile-flags: -C opt-level=3 LL| | LL| |#![allow(unused_assignments, unused_variables)] LL| | - LL| |// aux-build:used_inline_crate.rs + LL| |//@ aux-build:used_inline_crate.rs LL| |extern crate used_inline_crate; LL| | LL| 1|fn main() { diff --git a/tests/coverage/uses_inline_crate.rs b/tests/coverage/uses_inline_crate.rs index d7b4c3c057f4..a5b65ff7d84e 100644 --- a/tests/coverage/uses_inline_crate.rs +++ b/tests/coverage/uses_inline_crate.rs @@ -2,11 +2,11 @@ // the unused functions not instrumented, but it seems to be fine now. // Validates coverage now works with optimizations -// compile-flags: -C opt-level=3 +//@ compile-flags: -C opt-level=3 #![allow(unused_assignments, unused_variables)] -// aux-build:used_inline_crate.rs +//@ aux-build:used_inline_crate.rs extern crate used_inline_crate; fn main() { diff --git a/tests/coverage/while_early_ret.coverage b/tests/coverage/while_early_ret.coverage index f4372ad282e3..649642712c6f 100644 --- a/tests/coverage/while_early_ret.coverage +++ b/tests/coverage/while_early_ret.coverage @@ -1,5 +1,5 @@ LL| |#![allow(unused_assignments)] - LL| |// failure-status: 1 + LL| |//@ failure-status: 1 LL| | LL| |#[rustfmt::skip] LL| 1|fn main() -> Result<(), u8> { diff --git a/tests/coverage/while_early_ret.rs b/tests/coverage/while_early_ret.rs index a6421e797f61..cf115a8e3f95 100644 --- a/tests/coverage/while_early_ret.rs +++ b/tests/coverage/while_early_ret.rs @@ -1,5 +1,5 @@ #![allow(unused_assignments)] -// failure-status: 1 +//@ failure-status: 1 #[rustfmt::skip] fn main() -> Result<(), u8> { diff --git a/tests/debuginfo/associated-types.rs b/tests/debuginfo/associated-types.rs index a1735520b117..ab41073b7c44 100644 --- a/tests/debuginfo/associated-types.rs +++ b/tests/debuginfo/associated-types.rs @@ -1,8 +1,8 @@ // Some versions of the non-rust-enabled LLDB print the wrong generic // parameter type names in this test. -// needs-rust-lldb +//@ needs-rust-lldb -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== // gdb-command:run diff --git a/tests/debuginfo/auxiliary/cross_crate_debuginfo_type_uniquing.rs b/tests/debuginfo/auxiliary/cross_crate_debuginfo_type_uniquing.rs index b9bb3ba7209f..a53c821a383a 100644 --- a/tests/debuginfo/auxiliary/cross_crate_debuginfo_type_uniquing.rs +++ b/tests/debuginfo/auxiliary/cross_crate_debuginfo_type_uniquing.rs @@ -1,6 +1,6 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic #![crate_type = "rlib"] -// compile-flags:-g +//@ compile-flags:-g struct S1; diff --git a/tests/debuginfo/auxiliary/cross_crate_spans.rs b/tests/debuginfo/auxiliary/cross_crate_spans.rs index efe5e419542e..af853ee0b003 100644 --- a/tests/debuginfo/auxiliary/cross_crate_spans.rs +++ b/tests/debuginfo/auxiliary/cross_crate_spans.rs @@ -4,8 +4,8 @@ #![feature(omit_gdb_pretty_printer_section)] #![omit_gdb_pretty_printer_section] -// no-prefer-dynamic -// compile-flags:-g +//@ no-prefer-dynamic +//@ compile-flags:-g pub fn generic_function(val: T) -> (T, T) { let result = (val.clone(), val.clone()); diff --git a/tests/debuginfo/auxiliary/dependency-with-embedded-visualizers.rs b/tests/debuginfo/auxiliary/dependency-with-embedded-visualizers.rs index c187df637fdc..555f99784278 100644 --- a/tests/debuginfo/auxiliary/dependency-with-embedded-visualizers.rs +++ b/tests/debuginfo/auxiliary/dependency-with-embedded-visualizers.rs @@ -1,6 +1,6 @@ -// compile-flags:-g -// ignore-lldb -// no-prefer-dynamic +//@ compile-flags:-g +//@ ignore-lldb +//@ no-prefer-dynamic #![debugger_visualizer(natvis_file = "dependency-with-embedded-visualizers.natvis")] #![debugger_visualizer(gdb_script_file = "dependency-with-embedded-visualizers.py")] diff --git a/tests/debuginfo/auxiliary/issue-13213-aux.rs b/tests/debuginfo/auxiliary/issue-13213-aux.rs index bde98b44544d..b4787d557a53 100644 --- a/tests/debuginfo/auxiliary/issue-13213-aux.rs +++ b/tests/debuginfo/auxiliary/issue-13213-aux.rs @@ -1,5 +1,5 @@ #![crate_type = "lib"] -// compile-flags:-g +//@ compile-flags:-g pub use private::P; diff --git a/tests/debuginfo/auxiliary/macro-stepping.rs b/tests/debuginfo/auxiliary/macro-stepping.rs index ae50e11440bc..ce6137e55509 100644 --- a/tests/debuginfo/auxiliary/macro-stepping.rs +++ b/tests/debuginfo/auxiliary/macro-stepping.rs @@ -1,4 +1,4 @@ -// compile-flags:-g +//@ compile-flags:-g #![crate_type = "rlib"] diff --git a/tests/debuginfo/basic-types-globals-metadata.rs b/tests/debuginfo/basic-types-globals-metadata.rs index 3934d3c7a685..124be655c352 100644 --- a/tests/debuginfo/basic-types-globals-metadata.rs +++ b/tests/debuginfo/basic-types-globals-metadata.rs @@ -1,7 +1,7 @@ -// min-lldb-version: 310 -// ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155 +//@ min-lldb-version: 310 +//@ ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155 -// compile-flags:-g +//@ compile-flags:-g // gdb-command:run // gdbg-command:whatis 'basic_types_globals_metadata::B' // gdbr-command:whatis basic_types_globals_metadata::B diff --git a/tests/debuginfo/basic-types-globals.rs b/tests/debuginfo/basic-types-globals.rs index 8a3df8ba2d18..319e86ad4601 100644 --- a/tests/debuginfo/basic-types-globals.rs +++ b/tests/debuginfo/basic-types-globals.rs @@ -1,15 +1,15 @@ // Caveat - gdb doesn't know about UTF-32 character encoding and will print a // rust char as only its numerical value. -// min-lldb-version: 310 -// min-gdb-version: 8.0 +//@ min-lldb-version: 310 +//@ min-gdb-version: 8.0 -// revisions: lto no-lto +//@ revisions: lto no-lto -// compile-flags:-g +//@ compile-flags:-g -// [lto] compile-flags:-C lto -// [lto] no-prefer-dynamic +//@ [lto] compile-flags:-C lto +//@ [lto] no-prefer-dynamic // gdb-command:run // gdbg-command:print 'basic_types_globals::B' diff --git a/tests/debuginfo/basic-types-metadata.rs b/tests/debuginfo/basic-types-metadata.rs index ca0a6e232027..8a25c0c45241 100644 --- a/tests/debuginfo/basic-types-metadata.rs +++ b/tests/debuginfo/basic-types-metadata.rs @@ -1,7 +1,7 @@ -// min-lldb-version: 310 -// ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155 +//@ min-lldb-version: 310 +//@ ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155 -// compile-flags:-g +//@ compile-flags:-g // gdb-command:run // gdb-command:whatis unit // gdb-check:type = () diff --git a/tests/debuginfo/basic-types-mut-globals.rs b/tests/debuginfo/basic-types-mut-globals.rs index 9b0c46fa478c..c3e5f2534d31 100644 --- a/tests/debuginfo/basic-types-mut-globals.rs +++ b/tests/debuginfo/basic-types-mut-globals.rs @@ -4,10 +4,10 @@ // about UTF-32 character encoding and will print a rust char as only // its numerical value. -// min-lldb-version: 310 -// ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155 +//@ min-lldb-version: 310 +//@ ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155 -// compile-flags:-g +//@ compile-flags:-g // gdb-command:run diff --git a/tests/debuginfo/basic-types.rs b/tests/debuginfo/basic-types.rs index 9e82f0714690..8319b71bfcda 100644 --- a/tests/debuginfo/basic-types.rs +++ b/tests/debuginfo/basic-types.rs @@ -4,12 +4,12 @@ // about UTF-32 character encoding and will print a rust char as only // its numerical value. -// min-lldb-version: 310 +//@ min-lldb-version: 310 // This fails on lldb 6.0.1 on x86-64 Fedora 28; so ignore Linux for now. -// ignore-linux +//@ ignore-linux -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/borrowed-basic.rs b/tests/debuginfo/borrowed-basic.rs index 45f5df228e3f..52d61f33e7c0 100644 --- a/tests/debuginfo/borrowed-basic.rs +++ b/tests/debuginfo/borrowed-basic.rs @@ -1,5 +1,5 @@ -// compile-flags:-g -// min-lldb-version: 310 +//@ compile-flags:-g +//@ min-lldb-version: 310 // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/borrowed-c-style-enum.rs b/tests/debuginfo/borrowed-c-style-enum.rs index f212ff3951e3..950a05a0992f 100644 --- a/tests/debuginfo/borrowed-c-style-enum.rs +++ b/tests/debuginfo/borrowed-c-style-enum.rs @@ -1,5 +1,5 @@ -// compile-flags:-g -// min-lldb-version: 310 +//@ compile-flags:-g +//@ min-lldb-version: 310 // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/borrowed-enum.rs b/tests/debuginfo/borrowed-enum.rs index 37d458cb494c..aee4631a8b3d 100644 --- a/tests/debuginfo/borrowed-enum.rs +++ b/tests/debuginfo/borrowed-enum.rs @@ -1,8 +1,8 @@ // Require a gdb or lldb that can read DW_TAG_variant_part. -// min-gdb-version: 8.2 -// needs-rust-lldb +//@ min-gdb-version: 8.2 +//@ needs-rust-lldb -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/borrowed-struct.rs b/tests/debuginfo/borrowed-struct.rs index fe945266b13c..467de7878ee7 100644 --- a/tests/debuginfo/borrowed-struct.rs +++ b/tests/debuginfo/borrowed-struct.rs @@ -1,5 +1,5 @@ -// compile-flags:-g -// min-lldb-version: 310 +//@ compile-flags:-g +//@ min-lldb-version: 310 // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/borrowed-tuple.rs b/tests/debuginfo/borrowed-tuple.rs index cc28e49c4474..4fe1abbaba2c 100644 --- a/tests/debuginfo/borrowed-tuple.rs +++ b/tests/debuginfo/borrowed-tuple.rs @@ -1,6 +1,6 @@ -// min-lldb-version: 310 +//@ min-lldb-version: 310 -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/borrowed-unique-basic.rs b/tests/debuginfo/borrowed-unique-basic.rs index 94229bf27f3c..ae843c355bc5 100644 --- a/tests/debuginfo/borrowed-unique-basic.rs +++ b/tests/debuginfo/borrowed-unique-basic.rs @@ -1,6 +1,6 @@ -// min-lldb-version: 310 +//@ min-lldb-version: 310 -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/box.rs b/tests/debuginfo/box.rs index 3713c8c135d2..f2e744e87b91 100644 --- a/tests/debuginfo/box.rs +++ b/tests/debuginfo/box.rs @@ -1,6 +1,6 @@ -// min-lldb-version: 310 +//@ min-lldb-version: 310 -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/boxed-struct.rs b/tests/debuginfo/boxed-struct.rs index 64bc124756d6..c47bffb3a384 100644 --- a/tests/debuginfo/boxed-struct.rs +++ b/tests/debuginfo/boxed-struct.rs @@ -1,6 +1,6 @@ -// min-lldb-version: 310 +//@ min-lldb-version: 310 -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/by-value-non-immediate-argument.rs b/tests/debuginfo/by-value-non-immediate-argument.rs index b417567dcfec..52e3dc9a76bc 100644 --- a/tests/debuginfo/by-value-non-immediate-argument.rs +++ b/tests/debuginfo/by-value-non-immediate-argument.rs @@ -1,7 +1,7 @@ -// ignore-test // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155 -// min-lldb-version: 310 +//@ ignore-test // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155 +//@ min-lldb-version: 310 -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/by-value-self-argument-in-trait-impl.rs b/tests/debuginfo/by-value-self-argument-in-trait-impl.rs index e60cfc9242aa..247d6c27a06e 100644 --- a/tests/debuginfo/by-value-self-argument-in-trait-impl.rs +++ b/tests/debuginfo/by-value-self-argument-in-trait-impl.rs @@ -1,6 +1,6 @@ -// min-lldb-version: 310 +//@ min-lldb-version: 310 -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/c-style-enum-in-composite.rs b/tests/debuginfo/c-style-enum-in-composite.rs index 2ed49de58cd2..3f0968f09afd 100644 --- a/tests/debuginfo/c-style-enum-in-composite.rs +++ b/tests/debuginfo/c-style-enum-in-composite.rs @@ -1,6 +1,6 @@ -// min-lldb-version: 310 +//@ min-lldb-version: 310 -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/c-style-enum.rs b/tests/debuginfo/c-style-enum.rs index dce34fc0dcf5..2794575d3287 100644 --- a/tests/debuginfo/c-style-enum.rs +++ b/tests/debuginfo/c-style-enum.rs @@ -1,8 +1,8 @@ -// ignore-aarch64 -// ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155 -// min-lldb-version: 310 +//@ ignore-aarch64 +//@ ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155 +//@ min-lldb-version: 310 -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/captured-fields-1.rs b/tests/debuginfo/captured-fields-1.rs index b71734c2354d..f5fdf4fb3d9c 100644 --- a/tests/debuginfo/captured-fields-1.rs +++ b/tests/debuginfo/captured-fields-1.rs @@ -1,5 +1,5 @@ -// compile-flags:-g -// edition:2021 +//@ compile-flags:-g +//@ edition:2021 // === GDB TESTS =================================================================================== // gdb-command:run diff --git a/tests/debuginfo/captured-fields-2.rs b/tests/debuginfo/captured-fields-2.rs index 8d463fb24516..aaf4fa1bc454 100644 --- a/tests/debuginfo/captured-fields-2.rs +++ b/tests/debuginfo/captured-fields-2.rs @@ -1,5 +1,5 @@ -// compile-flags:-g -// edition:2021 +//@ compile-flags:-g +//@ edition:2021 // === GDB TESTS =================================================================================== // gdb-command:run diff --git a/tests/debuginfo/closure-in-generic-function.rs b/tests/debuginfo/closure-in-generic-function.rs index 91d7ddc5416d..676a624191c2 100644 --- a/tests/debuginfo/closure-in-generic-function.rs +++ b/tests/debuginfo/closure-in-generic-function.rs @@ -1,6 +1,6 @@ -// min-lldb-version: 310 +//@ min-lldb-version: 310 -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/collapse-debuginfo-external-attr.rs b/tests/debuginfo/collapse-debuginfo-external-attr.rs index f36b0833ad51..fba609bf89e6 100644 --- a/tests/debuginfo/collapse-debuginfo-external-attr.rs +++ b/tests/debuginfo/collapse-debuginfo-external-attr.rs @@ -1,9 +1,9 @@ -// ignore-lldb +//@ ignore-lldb #![feature(collapse_debuginfo)] // Test that local macro debug info is not collapsed with #[collapse_debuginfo(external)] -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/collapse-debuginfo-external-flag-overriden-by-attr.rs b/tests/debuginfo/collapse-debuginfo-external-flag-overriden-by-attr.rs index e5cbc1a685d0..51aa1f8ce19e 100644 --- a/tests/debuginfo/collapse-debuginfo-external-flag-overriden-by-attr.rs +++ b/tests/debuginfo/collapse-debuginfo-external-flag-overriden-by-attr.rs @@ -1,10 +1,10 @@ -// ignore-lldb +//@ ignore-lldb #![feature(collapse_debuginfo)] // Test that macro attribute #[collapse_debuginfo(no)] // overrides "collapse_macro_debuginfo=external" flag -// compile-flags:-g -Z collapse_macro_debuginfo=external +//@ compile-flags:-g -Z collapse_macro_debuginfo=external // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/collapse-debuginfo-external-flag.rs b/tests/debuginfo/collapse-debuginfo-external-flag.rs index 9a0aef38ea6c..f9ef1ae8a258 100644 --- a/tests/debuginfo/collapse-debuginfo-external-flag.rs +++ b/tests/debuginfo/collapse-debuginfo-external-flag.rs @@ -1,9 +1,9 @@ -// ignore-lldb +//@ ignore-lldb #![feature(collapse_debuginfo)] // Test that println macro debug info is collapsed with "collapse_macro_debuginfo=external" flag -// compile-flags:-g -Z collapse_macro_debuginfo=external +//@ compile-flags:-g -Z collapse_macro_debuginfo=external // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/collapse-debuginfo-in-non-collapse-macro.rs b/tests/debuginfo/collapse-debuginfo-in-non-collapse-macro.rs index d9500c3641ef..e67e1d83cdc9 100644 --- a/tests/debuginfo/collapse-debuginfo-in-non-collapse-macro.rs +++ b/tests/debuginfo/collapse-debuginfo-in-non-collapse-macro.rs @@ -1,4 +1,4 @@ -// ignore-lldb +//@ ignore-lldb #![feature(collapse_debuginfo)] // Test that statement, skipped/added/reordered by macros, is correctly processed in debuginfo. @@ -7,7 +7,7 @@ // without collapse_debuginfo attribute. // collapse_debuginfo feature enabled. -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/collapse-debuginfo-no-attr-flag.rs b/tests/debuginfo/collapse-debuginfo-no-attr-flag.rs index 413f6120105e..fbc7d03e0df8 100644 --- a/tests/debuginfo/collapse-debuginfo-no-attr-flag.rs +++ b/tests/debuginfo/collapse-debuginfo-no-attr-flag.rs @@ -1,11 +1,11 @@ -// ignore-lldb +//@ ignore-lldb #![feature(collapse_debuginfo)] // Test that line numbers are not replaced with those of the outermost expansion site when the // `collapse_debuginfo` is active, `-Zdebug-macros` is provided and `#[collapse_debuginfo]` not // being used. -// compile-flags:-g -Zdebug-macros +//@ compile-flags:-g -Zdebug-macros // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/collapse-debuginfo-no-attr.rs b/tests/debuginfo/collapse-debuginfo-no-attr.rs index d156c381a150..4ea1b2cf7a4e 100644 --- a/tests/debuginfo/collapse-debuginfo-no-attr.rs +++ b/tests/debuginfo/collapse-debuginfo-no-attr.rs @@ -1,10 +1,10 @@ -// ignore-lldb +//@ ignore-lldb #![feature(collapse_debuginfo)] // Test that line numbers are not replaced with those of the outermost expansion site when the // `collapse_debuginfo` feature is active and the attribute is not provided. -// compile-flags:-g -Z collapse_macro_debuginfo=no +//@ compile-flags:-g -Z collapse_macro_debuginfo=no // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/collapse-debuginfo-with-attr-flag.rs b/tests/debuginfo/collapse-debuginfo-with-attr-flag.rs index 183cf537e85d..b585cdf13e09 100644 --- a/tests/debuginfo/collapse-debuginfo-with-attr-flag.rs +++ b/tests/debuginfo/collapse-debuginfo-with-attr-flag.rs @@ -1,11 +1,11 @@ -// ignore-lldb +//@ ignore-lldb #![feature(collapse_debuginfo)] // Test that line numbers are not replaced with those of the outermost expansion site when the // `collapse_debuginfo` is active and `-Zdebug-macros` is provided, despite `#[collapse_debuginfo]` // being used. -// compile-flags:-g -Zdebug-macros +//@ compile-flags:-g -Zdebug-macros // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/collapse-debuginfo-with-attr.rs b/tests/debuginfo/collapse-debuginfo-with-attr.rs index 34d03c18bc72..e7698c5f6299 100644 --- a/tests/debuginfo/collapse-debuginfo-with-attr.rs +++ b/tests/debuginfo/collapse-debuginfo-with-attr.rs @@ -1,10 +1,10 @@ -// ignore-lldb +//@ ignore-lldb #![feature(collapse_debuginfo)] // Test that line numbers are replaced with those of the outermost expansion site when the // `collapse_debuginfo` feature is active and the attribute is provided. -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/collapse-debuginfo-with-yes-flag.rs b/tests/debuginfo/collapse-debuginfo-with-yes-flag.rs index 76a97a325d7e..2c3ecf3f5afb 100644 --- a/tests/debuginfo/collapse-debuginfo-with-yes-flag.rs +++ b/tests/debuginfo/collapse-debuginfo-with-yes-flag.rs @@ -1,10 +1,10 @@ -// ignore-lldb +//@ ignore-lldb #![feature(collapse_debuginfo)] // Test that line numbers are replaced with those of the outermost expansion site when the // `collapse_debuginfo` feature is active and the command line flag is provided. -// compile-flags:-g -Z collapse_macro_debuginfo=yes +//@ compile-flags:-g -Z collapse_macro_debuginfo=yes // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/constant-debug-locs.rs b/tests/debuginfo/constant-debug-locs.rs index bf85fdca4210..d834d9909859 100644 --- a/tests/debuginfo/constant-debug-locs.rs +++ b/tests/debuginfo/constant-debug-locs.rs @@ -1,6 +1,6 @@ -// min-lldb-version: 310 +//@ min-lldb-version: 310 -// compile-flags:-g +//@ compile-flags:-g #![allow(dead_code, unused_variables)] #![feature(omit_gdb_pretty_printer_section)] diff --git a/tests/debuginfo/constant-in-match-pattern.rs b/tests/debuginfo/constant-in-match-pattern.rs index e1b533b723b9..f34284be1640 100644 --- a/tests/debuginfo/constant-in-match-pattern.rs +++ b/tests/debuginfo/constant-in-match-pattern.rs @@ -1,6 +1,6 @@ -// min-lldb-version: 310 +//@ min-lldb-version: 310 -// compile-flags:-g +//@ compile-flags:-g #![allow(dead_code, unused_variables)] #![feature(omit_gdb_pretty_printer_section)] diff --git a/tests/debuginfo/coroutine-locals.rs b/tests/debuginfo/coroutine-locals.rs index e5eb1022ff49..0430e1d313bd 100644 --- a/tests/debuginfo/coroutine-locals.rs +++ b/tests/debuginfo/coroutine-locals.rs @@ -1,6 +1,6 @@ -// min-lldb-version: 310 +//@ min-lldb-version: 310 -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/coroutine-objects.rs b/tests/debuginfo/coroutine-objects.rs index 3e658b2136e7..98b37ac2001d 100644 --- a/tests/debuginfo/coroutine-objects.rs +++ b/tests/debuginfo/coroutine-objects.rs @@ -1,11 +1,11 @@ // Require a gdb that can read DW_TAG_variant_part. -// min-gdb-version: 8.2 +//@ min-gdb-version: 8.2 // LLDB without native Rust support cannot read DW_TAG_variant_part, // so it prints nothing for coroutines. But those tests are kept to // ensure that LLDB won't crash at least (like #57822). -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/cross-crate-spans.rs b/tests/debuginfo/cross-crate-spans.rs index 7c58e1db23f3..75550e1794cc 100644 --- a/tests/debuginfo/cross-crate-spans.rs +++ b/tests/debuginfo/cross-crate-spans.rs @@ -1,16 +1,16 @@ #![feature(omit_gdb_pretty_printer_section)] #![omit_gdb_pretty_printer_section] -// min-lldb-version: 310 +//@ min-lldb-version: 310 // This fails on lldb 6.0.1 on x86-64 Fedora 28; so mark it macOS-only // for now. -// only-macos +//@ only-macos -// aux-build:cross_crate_spans.rs +//@ aux-build:cross_crate_spans.rs extern crate cross_crate_spans; -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/cross-crate-type-uniquing.rs b/tests/debuginfo/cross-crate-type-uniquing.rs index 5974ddb3a174..88f8bac5d6f4 100644 --- a/tests/debuginfo/cross-crate-type-uniquing.rs +++ b/tests/debuginfo/cross-crate-type-uniquing.rs @@ -1,10 +1,10 @@ -// min-lldb-version: 310 +//@ min-lldb-version: 310 -// aux-build:cross_crate_debuginfo_type_uniquing.rs +//@ aux-build:cross_crate_debuginfo_type_uniquing.rs extern crate cross_crate_debuginfo_type_uniquing; -// no-prefer-dynamic -// compile-flags:-g -C lto +//@ no-prefer-dynamic +//@ compile-flags:-g -C lto pub struct C; pub fn p() -> C { diff --git a/tests/debuginfo/destructured-fn-argument.rs b/tests/debuginfo/destructured-fn-argument.rs index 9cd3874a5dfb..e6e697c518a1 100644 --- a/tests/debuginfo/destructured-fn-argument.rs +++ b/tests/debuginfo/destructured-fn-argument.rs @@ -1,6 +1,6 @@ -// min-lldb-version: 310 +//@ min-lldb-version: 310 -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/destructured-for-loop-variable.rs b/tests/debuginfo/destructured-for-loop-variable.rs index 15cb88ef25d5..3e27d122c4be 100644 --- a/tests/debuginfo/destructured-for-loop-variable.rs +++ b/tests/debuginfo/destructured-for-loop-variable.rs @@ -1,10 +1,10 @@ -// min-lldb-version: 310 +//@ min-lldb-version: 310 // This fails on lldb 6.0.1 on x86-64 Fedora 28; so mark it macOS-only // for now. -// only-macos +//@ only-macos -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/destructured-local.rs b/tests/debuginfo/destructured-local.rs index 3a2a889777ea..3e0557382b3c 100644 --- a/tests/debuginfo/destructured-local.rs +++ b/tests/debuginfo/destructured-local.rs @@ -1,6 +1,6 @@ -// min-lldb-version: 310 +//@ min-lldb-version: 310 -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/drop-locations.rs b/tests/debuginfo/drop-locations.rs index c195f46208a0..6404bf9c3dad 100644 --- a/tests/debuginfo/drop-locations.rs +++ b/tests/debuginfo/drop-locations.rs @@ -1,11 +1,11 @@ -// ignore-windows -// ignore-android -// ignore-test // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155 -// min-lldb-version: 310 +//@ ignore-windows +//@ ignore-android +//@ ignore-test // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155 +//@ min-lldb-version: 310 #![allow(unused)] -// compile-flags:-g -O -C no-prepopulate-passes +//@ compile-flags:-g -O -C no-prepopulate-passes // -O -C no-prepopulate-passes added to work around https://bugs.llvm.org/show_bug.cgi?id=32123 // This test checks that drop glue code gets attributed to scope's closing brace, diff --git a/tests/debuginfo/duration-type.rs b/tests/debuginfo/duration-type.rs index bc0266d644ec..4e4b17c02e10 100644 --- a/tests/debuginfo/duration-type.rs +++ b/tests/debuginfo/duration-type.rs @@ -1,5 +1,5 @@ -// only-cdb -// compile-flags:-g +//@ only-cdb +//@ compile-flags:-g // === CDB TESTS ================================================================================== diff --git a/tests/debuginfo/embedded-visualizer.rs b/tests/debuginfo/embedded-visualizer.rs index ac421092839f..69afd273f773 100644 --- a/tests/debuginfo/embedded-visualizer.rs +++ b/tests/debuginfo/embedded-visualizer.rs @@ -1,7 +1,7 @@ -// compile-flags:-g -// min-gdb-version: 8.1 -// ignore-lldb -// ignore-windows-gnu // emit_debug_gdb_scripts is disabled on Windows +//@ compile-flags:-g +//@ min-gdb-version: 8.1 +//@ ignore-lldb +//@ ignore-windows-gnu // emit_debug_gdb_scripts is disabled on Windows // === CDB TESTS ================================================================================== @@ -63,7 +63,7 @@ #![debugger_visualizer(natvis_file = "embedded-visualizer.natvis")] #![debugger_visualizer(gdb_script_file = "embedded-visualizer.py")] -// aux-build: dependency-with-embedded-visualizers.rs +//@ aux-build: dependency-with-embedded-visualizers.rs extern crate dependency_with_embedded_visualizers; use dependency_with_embedded_visualizers::Person; diff --git a/tests/debuginfo/empty-string.rs b/tests/debuginfo/empty-string.rs index 66eb8bae26b9..838e160e74ea 100644 --- a/tests/debuginfo/empty-string.rs +++ b/tests/debuginfo/empty-string.rs @@ -1,9 +1,9 @@ -// ignore-windows failing on win32 bot -// ignore-android: FIXME(#10381) -// compile-flags:-g -// min-gdb-version: 8.1 -// ignore-gdb-version: 7.11.90 - 8.0.9 -// min-lldb-version: 310 +//@ ignore-windows failing on win32 bot +//@ ignore-android: FIXME(#10381) +//@ compile-flags:-g +//@ min-gdb-version: 8.1 +//@ ignore-gdb-version: 7.11.90 - 8.0.9 +//@ min-lldb-version: 310 // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/enum-thinlto.rs b/tests/debuginfo/enum-thinlto.rs index b10e04a4a9eb..5c27fe4271ca 100644 --- a/tests/debuginfo/enum-thinlto.rs +++ b/tests/debuginfo/enum-thinlto.rs @@ -1,7 +1,7 @@ // Require a gdb that can read DW_TAG_variant_part. -// min-gdb-version: 8.2 +//@ min-gdb-version: 8.2 -// compile-flags:-g -Z thinlto +//@ compile-flags:-g -Z thinlto // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/evec-in-struct.rs b/tests/debuginfo/evec-in-struct.rs index 0d94cd224ec0..d238cc9eded1 100644 --- a/tests/debuginfo/evec-in-struct.rs +++ b/tests/debuginfo/evec-in-struct.rs @@ -1,6 +1,6 @@ -// min-lldb-version: 310 +//@ min-lldb-version: 310 -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/extern-c-fn.rs b/tests/debuginfo/extern-c-fn.rs index 17a452ec6344..62c2b6099692 100644 --- a/tests/debuginfo/extern-c-fn.rs +++ b/tests/debuginfo/extern-c-fn.rs @@ -1,6 +1,6 @@ -// min-lldb-version: 310 +//@ min-lldb-version: 310 -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== // gdb-command:run diff --git a/tests/debuginfo/fixed-sized-array.rs b/tests/debuginfo/fixed-sized-array.rs index d8899224d284..e538c57f5fef 100644 --- a/tests/debuginfo/fixed-sized-array.rs +++ b/tests/debuginfo/fixed-sized-array.rs @@ -1,8 +1,8 @@ // Testing the display of fixed sized arrays in cdb. // cdb-only -// min-cdb-version: 10.0.18317.1001 -// compile-flags:-g +//@ min-cdb-version: 10.0.18317.1001 +//@ compile-flags:-g // === CDB TESTS ================================================================================== diff --git a/tests/debuginfo/function-arg-initialization.rs b/tests/debuginfo/function-arg-initialization.rs index dea1339517b4..4bdaefd9bdd2 100644 --- a/tests/debuginfo/function-arg-initialization.rs +++ b/tests/debuginfo/function-arg-initialization.rs @@ -1,5 +1,5 @@ -// ignore-test // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155 -// min-lldb-version: 310 +//@ ignore-test // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155 +//@ min-lldb-version: 310 // This test case checks if function arguments already have the correct value // when breaking at the first line of the function, that is if the function @@ -8,7 +8,7 @@ // arguments have been properly loaded when setting the breakpoint via the // function name. -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/function-arguments.rs b/tests/debuginfo/function-arguments.rs index 5cfd7d1f8f19..c6b865bd458e 100644 --- a/tests/debuginfo/function-arguments.rs +++ b/tests/debuginfo/function-arguments.rs @@ -1,6 +1,6 @@ -// min-lldb-version: 310 +//@ min-lldb-version: 310 -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/function-call.rs b/tests/debuginfo/function-call.rs index 75334558b589..3d8d798928d7 100644 --- a/tests/debuginfo/function-call.rs +++ b/tests/debuginfo/function-call.rs @@ -1,7 +1,7 @@ // This test does not passed with gdb < 8.0. See #53497. -// min-gdb-version: 10.1 +//@ min-gdb-version: 10.1 -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/function-names.rs b/tests/debuginfo/function-names.rs index d29b3ea76b70..1e4be4324455 100644 --- a/tests/debuginfo/function-names.rs +++ b/tests/debuginfo/function-names.rs @@ -1,7 +1,7 @@ // Function names are formatted differently in old versions of GDB -// min-gdb-version: 10.1 +//@ min-gdb-version: 10.1 -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/function-prologue-stepping-regular.rs b/tests/debuginfo/function-prologue-stepping-regular.rs index 699ff84ee0a6..e52d17a70bd7 100644 --- a/tests/debuginfo/function-prologue-stepping-regular.rs +++ b/tests/debuginfo/function-prologue-stepping-regular.rs @@ -1,10 +1,10 @@ // This test case checks if function arguments already have the correct value when breaking at the // beginning of a function. -// min-lldb-version: 310 -// ignore-gdb -// ignore-test // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155 -// compile-flags:-g +//@ min-lldb-version: 310 +//@ ignore-gdb +//@ ignore-test // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155 +//@ compile-flags:-g // lldb-command:breakpoint set --name immediate_args // lldb-command:breakpoint set --name non_immediate_args diff --git a/tests/debuginfo/gdb-char.rs b/tests/debuginfo/gdb-char.rs index 1863405bf1e9..7d8608d4f511 100644 --- a/tests/debuginfo/gdb-char.rs +++ b/tests/debuginfo/gdb-char.rs @@ -1,8 +1,8 @@ // GDB got support for DW_ATE_UTF in 11.2, see // https://sourceware.org/bugzilla/show_bug.cgi?id=28637. -// min-gdb-version: 11.2 -// compile-flags: -g +//@ min-gdb-version: 11.2 +//@ compile-flags: -g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/gdb-pretty-struct-and-enums.rs b/tests/debuginfo/gdb-pretty-struct-and-enums.rs index 3314f0a4e43c..235295e887c2 100644 --- a/tests/debuginfo/gdb-pretty-struct-and-enums.rs +++ b/tests/debuginfo/gdb-pretty-struct-and-enums.rs @@ -1,8 +1,8 @@ -// ignore-lldb -// ignore-android: FIXME(#10381) -// min-gdb-version: 8.1 +//@ ignore-lldb +//@ ignore-android: FIXME(#10381) +//@ min-gdb-version: 8.1 -// compile-flags:-g +//@ compile-flags:-g // gdb-command: run diff --git a/tests/debuginfo/generic-enum-with-different-disr-sizes.rs b/tests/debuginfo/generic-enum-with-different-disr-sizes.rs index adcb04da30d0..6a8aa831c404 100644 --- a/tests/debuginfo/generic-enum-with-different-disr-sizes.rs +++ b/tests/debuginfo/generic-enum-with-different-disr-sizes.rs @@ -1,10 +1,10 @@ -// ignore-lldb: FIXME(#27089) -// min-lldb-version: 310 +//@ ignore-lldb: FIXME(#27089) +//@ min-lldb-version: 310 // Require a gdb that can read DW_TAG_variant_part. -// min-gdb-version: 8.2 +//@ min-gdb-version: 8.2 -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== // gdb-command:run diff --git a/tests/debuginfo/generic-function.rs b/tests/debuginfo/generic-function.rs index e8f3940c8360..eab781d2150d 100644 --- a/tests/debuginfo/generic-function.rs +++ b/tests/debuginfo/generic-function.rs @@ -1,6 +1,6 @@ -// min-lldb-version: 310 +//@ min-lldb-version: 310 -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/generic-functions-nested.rs b/tests/debuginfo/generic-functions-nested.rs index 4c4297f942a9..a146015246e8 100644 --- a/tests/debuginfo/generic-functions-nested.rs +++ b/tests/debuginfo/generic-functions-nested.rs @@ -1,6 +1,6 @@ -// min-lldb-version: 310 +//@ min-lldb-version: 310 -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/generic-method-on-generic-struct.rs b/tests/debuginfo/generic-method-on-generic-struct.rs index 2d54c2b07df3..dd1f482f3fa6 100644 --- a/tests/debuginfo/generic-method-on-generic-struct.rs +++ b/tests/debuginfo/generic-method-on-generic-struct.rs @@ -1,8 +1,8 @@ -// compile-flags:-g +//@ compile-flags:-g // Some versions of the non-rust-enabled LLDB print the wrong generic // parameter type names in this test. -// needs-rust-lldb +//@ needs-rust-lldb // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/generic-static-method-on-struct-and-enum.rs b/tests/debuginfo/generic-static-method-on-struct-and-enum.rs index b0ac8ae85772..98608e329148 100644 --- a/tests/debuginfo/generic-static-method-on-struct-and-enum.rs +++ b/tests/debuginfo/generic-static-method-on-struct-and-enum.rs @@ -1,6 +1,6 @@ -// min-lldb-version: 310 +//@ min-lldb-version: 310 -// compile-flags:-g +//@ compile-flags:-g // gdb-command:run diff --git a/tests/debuginfo/generic-struct-style-enum.rs b/tests/debuginfo/generic-struct-style-enum.rs index 764330ae27f5..7d929b91064c 100644 --- a/tests/debuginfo/generic-struct-style-enum.rs +++ b/tests/debuginfo/generic-struct-style-enum.rs @@ -1,9 +1,9 @@ -// min-lldb-version: 310 +//@ min-lldb-version: 310 // Require a gdb that can read DW_TAG_variant_part. -// min-gdb-version: 8.2 +//@ min-gdb-version: 8.2 -// compile-flags:-g +//@ compile-flags:-g // gdb-command:set print union on // gdb-command:run diff --git a/tests/debuginfo/generic-struct.rs b/tests/debuginfo/generic-struct.rs index 5213eebc18bd..82ed17618aaa 100644 --- a/tests/debuginfo/generic-struct.rs +++ b/tests/debuginfo/generic-struct.rs @@ -1,8 +1,8 @@ // Some versions of the non-rust-enabled LLDB print the wrong generic // parameter type names in this test. -// needs-rust-lldb +//@ needs-rust-lldb -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/generic-tuple-style-enum.rs b/tests/debuginfo/generic-tuple-style-enum.rs index a55402691dc3..fb5deb9b1982 100644 --- a/tests/debuginfo/generic-tuple-style-enum.rs +++ b/tests/debuginfo/generic-tuple-style-enum.rs @@ -1,8 +1,8 @@ // Require a gdb or lldb that can read DW_TAG_variant_part. -// min-gdb-version: 8.2 -// needs-rust-lldb +//@ min-gdb-version: 8.2 +//@ needs-rust-lldb -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/include_string.rs b/tests/debuginfo/include_string.rs index 30e9deabb04a..6f7d2b28b418 100644 --- a/tests/debuginfo/include_string.rs +++ b/tests/debuginfo/include_string.rs @@ -1,6 +1,6 @@ -// min-lldb-version: 310 +//@ min-lldb-version: 310 -// compile-flags:-g +//@ compile-flags:-g // gdb-command:run // gdb-command:print string1.length // gdb-check:$1 = 48 diff --git a/tests/debuginfo/issue-12886.rs b/tests/debuginfo/issue-12886.rs index 389221cbbf15..c6cf0dd4e05e 100644 --- a/tests/debuginfo/issue-12886.rs +++ b/tests/debuginfo/issue-12886.rs @@ -1,8 +1,8 @@ -// ignore-windows failing on 64-bit bots FIXME #17638 -// ignore-lldb -// ignore-aarch64 +//@ ignore-windows failing on 64-bit bots FIXME #17638 +//@ ignore-lldb +//@ ignore-aarch64 -// compile-flags:-g +//@ compile-flags:-g // gdb-command:run // gdb-command:next diff --git a/tests/debuginfo/issue-13213.rs b/tests/debuginfo/issue-13213.rs index 393478460d48..7ef9178ce9d9 100644 --- a/tests/debuginfo/issue-13213.rs +++ b/tests/debuginfo/issue-13213.rs @@ -1,11 +1,11 @@ -// min-lldb-version: 310 -// ignore-cdb: Fails with exit code 0xc0000135 ("the application failed to initialize properly") +//@ min-lldb-version: 310 +//@ ignore-cdb: Fails with exit code 0xc0000135 ("the application failed to initialize properly") -// aux-build:issue-13213-aux.rs +//@ aux-build:issue-13213-aux.rs extern crate issue_13213_aux; -// compile-flags:-g +//@ compile-flags:-g // This tests make sure that we get no linker error when using a completely inlined static. Some // statics that are marked with AvailableExternallyLinkage in the importing crate, may actually not diff --git a/tests/debuginfo/issue-14411.rs b/tests/debuginfo/issue-14411.rs index 19609f428467..3258fec1e870 100644 --- a/tests/debuginfo/issue-14411.rs +++ b/tests/debuginfo/issue-14411.rs @@ -1,6 +1,6 @@ -// min-lldb-version: 310 +//@ min-lldb-version: 310 -// compile-flags:-g +//@ compile-flags:-g // No debugger interaction required: just make sure it compiles without // crashing. diff --git a/tests/debuginfo/issue-22656.rs b/tests/debuginfo/issue-22656.rs index f286566277e9..acbe2b12a248 100644 --- a/tests/debuginfo/issue-22656.rs +++ b/tests/debuginfo/issue-22656.rs @@ -2,10 +2,10 @@ // when trying to handle a Vec<> or anything else that contains zero-sized // fields. -// min-lldb-version: 310 -// ignore-gdb +//@ min-lldb-version: 310 +//@ ignore-gdb -// compile-flags:-g +//@ compile-flags:-g // === LLDB TESTS ================================================================================== // lldb-command:run diff --git a/tests/debuginfo/issue-57822.rs b/tests/debuginfo/issue-57822.rs index a12a562a033d..f4ef45f1d74b 100644 --- a/tests/debuginfo/issue-57822.rs +++ b/tests/debuginfo/issue-57822.rs @@ -2,9 +2,9 @@ // for nested closures and coroutines. // Require a gdb that can read DW_TAG_variant_part. -// min-gdb-version: 8.2 +//@ min-gdb-version: 8.2 -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/issue-7712.rs b/tests/debuginfo/issue-7712.rs index 3a7565f559a7..35e6b10c4e58 100644 --- a/tests/debuginfo/issue-7712.rs +++ b/tests/debuginfo/issue-7712.rs @@ -1,5 +1,5 @@ -// compile-flags:-C debuginfo=1 -// min-lldb-version: 310 +//@ compile-flags:-C debuginfo=1 +//@ min-lldb-version: 310 pub trait TraitWithDefaultMethod : Sized { fn method(self) { diff --git a/tests/debuginfo/lexical-scope-in-for-loop.rs b/tests/debuginfo/lexical-scope-in-for-loop.rs index 28acab5cb974..93be5288a640 100644 --- a/tests/debuginfo/lexical-scope-in-for-loop.rs +++ b/tests/debuginfo/lexical-scope-in-for-loop.rs @@ -1,6 +1,6 @@ -// min-lldb-version: 310 +//@ min-lldb-version: 310 -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/lexical-scope-in-if-let.rs b/tests/debuginfo/lexical-scope-in-if-let.rs index 8fee459bd7ac..6e5e9900abea 100644 --- a/tests/debuginfo/lexical-scope-in-if-let.rs +++ b/tests/debuginfo/lexical-scope-in-if-let.rs @@ -1,4 +1,4 @@ -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS ================================================================================== diff --git a/tests/debuginfo/lexical-scope-in-if.rs b/tests/debuginfo/lexical-scope-in-if.rs index 06bef329df51..88b4244a503e 100644 --- a/tests/debuginfo/lexical-scope-in-if.rs +++ b/tests/debuginfo/lexical-scope-in-if.rs @@ -1,6 +1,6 @@ -// min-lldb-version: 310 +//@ min-lldb-version: 310 -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/lexical-scope-in-match.rs b/tests/debuginfo/lexical-scope-in-match.rs index 64b7c809d0d8..8a9ecfad249e 100644 --- a/tests/debuginfo/lexical-scope-in-match.rs +++ b/tests/debuginfo/lexical-scope-in-match.rs @@ -1,6 +1,6 @@ -// min-lldb-version: 310 +//@ min-lldb-version: 310 -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/lexical-scope-in-parameterless-closure.rs b/tests/debuginfo/lexical-scope-in-parameterless-closure.rs index d6b947fad8e1..fa2cd281c807 100644 --- a/tests/debuginfo/lexical-scope-in-parameterless-closure.rs +++ b/tests/debuginfo/lexical-scope-in-parameterless-closure.rs @@ -1,6 +1,6 @@ -// min-lldb-version: 310 +//@ min-lldb-version: 310 -// compile-flags:-C debuginfo=1 +//@ compile-flags:-C debuginfo=1 // gdb-command:run // lldb-command:run diff --git a/tests/debuginfo/lexical-scope-in-stack-closure.rs b/tests/debuginfo/lexical-scope-in-stack-closure.rs index 18d9a809e284..eeafed9f4db1 100644 --- a/tests/debuginfo/lexical-scope-in-stack-closure.rs +++ b/tests/debuginfo/lexical-scope-in-stack-closure.rs @@ -1,6 +1,6 @@ -// min-lldb-version: 310 +//@ min-lldb-version: 310 -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/lexical-scope-in-unconditional-loop.rs b/tests/debuginfo/lexical-scope-in-unconditional-loop.rs index 6b6af20639e4..ec998975bc7c 100644 --- a/tests/debuginfo/lexical-scope-in-unconditional-loop.rs +++ b/tests/debuginfo/lexical-scope-in-unconditional-loop.rs @@ -1,6 +1,6 @@ -// min-lldb-version: 310 +//@ min-lldb-version: 310 -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/lexical-scope-in-unique-closure.rs b/tests/debuginfo/lexical-scope-in-unique-closure.rs index 9dd44ae8baf3..9376d0391875 100644 --- a/tests/debuginfo/lexical-scope-in-unique-closure.rs +++ b/tests/debuginfo/lexical-scope-in-unique-closure.rs @@ -1,6 +1,6 @@ -// min-lldb-version: 310 +//@ min-lldb-version: 310 -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/lexical-scope-in-while.rs b/tests/debuginfo/lexical-scope-in-while.rs index 07f4a846fd90..f70ef9c2dd17 100644 --- a/tests/debuginfo/lexical-scope-in-while.rs +++ b/tests/debuginfo/lexical-scope-in-while.rs @@ -1,6 +1,6 @@ -// min-lldb-version: 310 +//@ min-lldb-version: 310 -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/lexical-scope-with-macro.rs b/tests/debuginfo/lexical-scope-with-macro.rs index 3dab7939265a..400dde6af313 100644 --- a/tests/debuginfo/lexical-scope-with-macro.rs +++ b/tests/debuginfo/lexical-scope-with-macro.rs @@ -1,7 +1,7 @@ -// min-lldb-version: 310 -// ignore-lldb FIXME #48807 +//@ min-lldb-version: 310 +//@ ignore-lldb FIXME #48807 -// compile-flags:-g -Zdebug-macros +//@ compile-flags:-g -Zdebug-macros // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/lexical-scopes-in-block-expression.rs b/tests/debuginfo/lexical-scopes-in-block-expression.rs index 72621ffc7426..09cb81424747 100644 --- a/tests/debuginfo/lexical-scopes-in-block-expression.rs +++ b/tests/debuginfo/lexical-scopes-in-block-expression.rs @@ -1,7 +1,7 @@ -// min-lldb-version: 310 -// ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155 +//@ min-lldb-version: 310 +//@ ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155 -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/limited-debuginfo.rs b/tests/debuginfo/limited-debuginfo.rs index bd381cd0e22d..32f14955bfa3 100644 --- a/tests/debuginfo/limited-debuginfo.rs +++ b/tests/debuginfo/limited-debuginfo.rs @@ -1,7 +1,7 @@ -// ignore-lldb -// ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155 +//@ ignore-lldb +//@ ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155 -// compile-flags:-C debuginfo=1 +//@ compile-flags:-C debuginfo=1 // Make sure functions have proper names // gdb-command:info functions diff --git a/tests/debuginfo/macro-stepping.rs b/tests/debuginfo/macro-stepping.rs index a7287cffd029..69cabd92298c 100644 --- a/tests/debuginfo/macro-stepping.rs +++ b/tests/debuginfo/macro-stepping.rs @@ -1,17 +1,17 @@ -// ignore-windows -// ignore-android -// ignore-aarch64 -// min-lldb-version: 310 -// ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155 +//@ ignore-windows +//@ ignore-android +//@ ignore-aarch64 +//@ min-lldb-version: 310 +//@ ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155 -// aux-build:macro-stepping.rs +//@ aux-build:macro-stepping.rs #![allow(unused)] #[macro_use] extern crate macro_stepping; // exports new_scope!() -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/marker-types.rs b/tests/debuginfo/marker-types.rs index 8373d7856bb3..6686b057ef7b 100644 --- a/tests/debuginfo/marker-types.rs +++ b/tests/debuginfo/marker-types.rs @@ -1,5 +1,5 @@ -// only-cdb -// compile-flags:-g +//@ only-cdb +//@ compile-flags:-g // === CDB TESTS ================================================================================== diff --git a/tests/debuginfo/method-on-enum.rs b/tests/debuginfo/method-on-enum.rs index aaa9bd9d6f97..454967c6cb71 100644 --- a/tests/debuginfo/method-on-enum.rs +++ b/tests/debuginfo/method-on-enum.rs @@ -1,7 +1,7 @@ -// min-lldb-version: 310 -// ignore-test // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155 +//@ min-lldb-version: 310 +//@ ignore-test // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155 -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/method-on-generic-struct.rs b/tests/debuginfo/method-on-generic-struct.rs index 138d8391d40a..562798c27daa 100644 --- a/tests/debuginfo/method-on-generic-struct.rs +++ b/tests/debuginfo/method-on-generic-struct.rs @@ -1,8 +1,8 @@ // Some versions of the non-rust-enabled LLDB print the wrong generic // parameter type names in this test. -// needs-rust-lldb +//@ needs-rust-lldb -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/method-on-struct.rs b/tests/debuginfo/method-on-struct.rs index deed4f9cc0ad..bb94ced305d6 100644 --- a/tests/debuginfo/method-on-struct.rs +++ b/tests/debuginfo/method-on-struct.rs @@ -1,6 +1,6 @@ -// min-lldb-version: 310 +//@ min-lldb-version: 310 -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/method-on-trait.rs b/tests/debuginfo/method-on-trait.rs index 7ebebfa72b92..bc8def40105c 100644 --- a/tests/debuginfo/method-on-trait.rs +++ b/tests/debuginfo/method-on-trait.rs @@ -1,6 +1,6 @@ -// min-lldb-version: 310 +//@ min-lldb-version: 310 -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/method-on-tuple-struct.rs b/tests/debuginfo/method-on-tuple-struct.rs index a5a87b2ad6f2..7ac0a2d85748 100644 --- a/tests/debuginfo/method-on-tuple-struct.rs +++ b/tests/debuginfo/method-on-tuple-struct.rs @@ -1,6 +1,6 @@ -// min-lldb-version: 310 +//@ min-lldb-version: 310 -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/msvc-pretty-enums.rs b/tests/debuginfo/msvc-pretty-enums.rs index 400e8801ca21..c6dd9f7939df 100644 --- a/tests/debuginfo/msvc-pretty-enums.rs +++ b/tests/debuginfo/msvc-pretty-enums.rs @@ -1,5 +1,5 @@ -// only-cdb -// compile-flags:-g +//@ only-cdb +//@ compile-flags:-g // cdb-command: g diff --git a/tests/debuginfo/msvc-scalarpair-params.rs b/tests/debuginfo/msvc-scalarpair-params.rs index ae67f6981519..436a5e07035e 100644 --- a/tests/debuginfo/msvc-scalarpair-params.rs +++ b/tests/debuginfo/msvc-scalarpair-params.rs @@ -1,5 +1,5 @@ -// only-cdb -// compile-flags: -g +//@ only-cdb +//@ compile-flags: -g // cdb-command: g diff --git a/tests/debuginfo/multi-byte-chars.rs b/tests/debuginfo/multi-byte-chars.rs index 5c68a88f2fb1..8fb066c71857 100644 --- a/tests/debuginfo/multi-byte-chars.rs +++ b/tests/debuginfo/multi-byte-chars.rs @@ -1,6 +1,6 @@ -// min-lldb-version: 310 +//@ min-lldb-version: 310 -// compile-flags:-g +//@ compile-flags:-g // This test checks whether debuginfo generation can handle multi-byte UTF-8 // characters at the end of a block. There's no need to do anything in the diff --git a/tests/debuginfo/multi-cgu.rs b/tests/debuginfo/multi-cgu.rs index 0ca7ce60e490..b2ad1d3cd95c 100644 --- a/tests/debuginfo/multi-cgu.rs +++ b/tests/debuginfo/multi-cgu.rs @@ -2,9 +2,9 @@ // compiled with multiple codegen units. (see #39160) -// min-lldb-version: 310 +//@ min-lldb-version: 310 -// compile-flags:-g -Ccodegen-units=2 +//@ compile-flags:-g -Ccodegen-units=2 // === GDB TESTS =============================================================== diff --git a/tests/debuginfo/multiple-functions-equal-var-names.rs b/tests/debuginfo/multiple-functions-equal-var-names.rs index 32b639c7f213..08446997b424 100644 --- a/tests/debuginfo/multiple-functions-equal-var-names.rs +++ b/tests/debuginfo/multiple-functions-equal-var-names.rs @@ -1,6 +1,6 @@ -// min-lldb-version: 310 +//@ min-lldb-version: 310 -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/multiple-functions.rs b/tests/debuginfo/multiple-functions.rs index 873857b6ae7c..2c4092fd5a33 100644 --- a/tests/debuginfo/multiple-functions.rs +++ b/tests/debuginfo/multiple-functions.rs @@ -1,6 +1,6 @@ -// min-lldb-version: 310 +//@ min-lldb-version: 310 -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/mutable-locs.rs b/tests/debuginfo/mutable-locs.rs index 688483e43e4d..5ba4adeca20e 100644 --- a/tests/debuginfo/mutable-locs.rs +++ b/tests/debuginfo/mutable-locs.rs @@ -1,8 +1,8 @@ // Testing the display of Cell, RefCell, and RefMut in cdb. // cdb-only -// min-cdb-version: 10.0.18317.1001 -// compile-flags:-g +//@ min-cdb-version: 10.0.18317.1001 +//@ compile-flags:-g // === CDB TESTS ================================================================================== diff --git a/tests/debuginfo/mutex.rs b/tests/debuginfo/mutex.rs index ab9fb8b7e81d..1201da0dd7b8 100644 --- a/tests/debuginfo/mutex.rs +++ b/tests/debuginfo/mutex.rs @@ -1,8 +1,8 @@ // Testing the display of Mutex and MutexGuard in cdb. // cdb-only -// min-cdb-version: 10.0.21287.1005 -// compile-flags:-g +//@ min-cdb-version: 10.0.21287.1005 +//@ compile-flags:-g // === CDB TESTS ================================================================================== // diff --git a/tests/debuginfo/name-shadowing-and-scope-nesting.rs b/tests/debuginfo/name-shadowing-and-scope-nesting.rs index 6cee893ce3fa..e8860b2d1048 100644 --- a/tests/debuginfo/name-shadowing-and-scope-nesting.rs +++ b/tests/debuginfo/name-shadowing-and-scope-nesting.rs @@ -1,6 +1,6 @@ -// min-lldb-version: 310 +//@ min-lldb-version: 310 -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/no_mangle-info.rs b/tests/debuginfo/no_mangle-info.rs index e22d368745f5..15629d217ba7 100644 --- a/tests/debuginfo/no_mangle-info.rs +++ b/tests/debuginfo/no_mangle-info.rs @@ -1,5 +1,5 @@ -// compile-flags:-g -// min-gdb-version: 10.1 +//@ compile-flags:-g +//@ min-gdb-version: 10.1 // === GDB TESTS =================================================================================== // gdb-command:run diff --git a/tests/debuginfo/numeric-types.rs b/tests/debuginfo/numeric-types.rs index a1b5ae792a16..e3df1fbc5201 100644 --- a/tests/debuginfo/numeric-types.rs +++ b/tests/debuginfo/numeric-types.rs @@ -1,7 +1,7 @@ -// compile-flags:-g +//@ compile-flags:-g -// min-gdb-version: 8.1 -// ignore-windows-gnu // emit_debug_gdb_scripts is disabled on Windows +//@ min-gdb-version: 8.1 +//@ ignore-windows-gnu // emit_debug_gdb_scripts is disabled on Windows // Tests the visualizations for `NonZero`, `Wrapping` and // `Atomic{Bool,I8,I16,I32,I64,Isize,U8,U16,U32,U64,Usize}` located in `libcore.natvis`. diff --git a/tests/debuginfo/option-like-enum.rs b/tests/debuginfo/option-like-enum.rs index 04d08b9e6a5c..b2a8aa1c29a0 100644 --- a/tests/debuginfo/option-like-enum.rs +++ b/tests/debuginfo/option-like-enum.rs @@ -1,8 +1,8 @@ -// ignore-test // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155 +//@ ignore-test // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155 -// min-lldb-version: 310 +//@ min-lldb-version: 310 -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/packed-struct-with-destructor.rs b/tests/debuginfo/packed-struct-with-destructor.rs index 196d85b4181f..19788339efa9 100644 --- a/tests/debuginfo/packed-struct-with-destructor.rs +++ b/tests/debuginfo/packed-struct-with-destructor.rs @@ -1,6 +1,6 @@ -// min-lldb-version: 310 +//@ min-lldb-version: 310 -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/packed-struct.rs b/tests/debuginfo/packed-struct.rs index 7d1893a9431c..0276a0ffb082 100644 --- a/tests/debuginfo/packed-struct.rs +++ b/tests/debuginfo/packed-struct.rs @@ -1,7 +1,7 @@ -// min-lldb-version: 310 -// ignore-gdb-version: 7.11.90 - 7.12.9 +//@ min-lldb-version: 310 +//@ ignore-gdb-version: 7.11.90 - 7.12.9 -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/pretty-huge-vec.rs b/tests/debuginfo/pretty-huge-vec.rs index 84f76ba4e6e0..f4b5345b66d7 100644 --- a/tests/debuginfo/pretty-huge-vec.rs +++ b/tests/debuginfo/pretty-huge-vec.rs @@ -1,9 +1,9 @@ -// ignore-windows failing on win32 bot -// ignore-freebsd: gdb package too new -// ignore-android: FIXME(#10381) -// compile-flags:-g -// min-gdb-version: 8.1 -// min-lldb-version: 310 +//@ ignore-windows failing on win32 bot +//@ ignore-freebsd: gdb package too new +//@ ignore-android: FIXME(#10381) +//@ compile-flags:-g +//@ min-gdb-version: 8.1 +//@ min-lldb-version: 310 // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/pretty-slices.rs b/tests/debuginfo/pretty-slices.rs index 6adc8757b726..4faa317d6a19 100644 --- a/tests/debuginfo/pretty-slices.rs +++ b/tests/debuginfo/pretty-slices.rs @@ -1,6 +1,6 @@ -// ignore-android: FIXME(#10381) -// ignore-windows -// compile-flags:-g +//@ ignore-android: FIXME(#10381) +//@ ignore-windows +//@ compile-flags:-g // gdb-command: run diff --git a/tests/debuginfo/pretty-std-collections-hash.rs b/tests/debuginfo/pretty-std-collections-hash.rs index 40bde8606996..2504a60cbcd8 100644 --- a/tests/debuginfo/pretty-std-collections-hash.rs +++ b/tests/debuginfo/pretty-std-collections-hash.rs @@ -1,9 +1,9 @@ // CDB doesn't like how libstd.natvis casts to tuples before this version. // https://github.com/rust-lang/rust/issues/76352#issuecomment-687640746 -// min-cdb-version: 10.0.18362.1 +//@ min-cdb-version: 10.0.18362.1 // cdb-only -// compile-flags:-g +//@ compile-flags:-g // === CDB TESTS ================================================================================== diff --git a/tests/debuginfo/pretty-std-collections.rs b/tests/debuginfo/pretty-std-collections.rs index 93a0dff68489..6e7c8dfbbe82 100644 --- a/tests/debuginfo/pretty-std-collections.rs +++ b/tests/debuginfo/pretty-std-collections.rs @@ -1,13 +1,13 @@ -// ignore-windows failing on win32 bot -// ignore-freebsd: gdb package too new -// ignore-android: FIXME(#10381) -// compile-flags:-g +//@ ignore-windows failing on win32 bot +//@ ignore-freebsd: gdb package too new +//@ ignore-android: FIXME(#10381) +//@ compile-flags:-g // The pretty printers being tested here require the patch from // https://sourceware.org/bugzilla/show_bug.cgi?id=21763 -// min-gdb-version: 8.1 +//@ min-gdb-version: 8.1 -// min-lldb-version: 310 +//@ min-lldb-version: 310 // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/pretty-std.rs b/tests/debuginfo/pretty-std.rs index c7df7dc3cb3b..2c2795379c93 100644 --- a/tests/debuginfo/pretty-std.rs +++ b/tests/debuginfo/pretty-std.rs @@ -1,10 +1,11 @@ -// ignore-freebsd: gdb package too new -// only-cdb // "Temporarily" ignored on GDB/LLDB due to debuginfo tests being disabled, see PR 47155 -// ignore-android: FIXME(#10381) -// compile-flags:-g -// min-gdb-version: 7.7 -// min-lldb-version: 310 -// min-cdb-version: 10.0.18317.1001 +// ignore-tidy-linelength +//@ ignore-freebsd: gdb package too new +//@ only-cdb // "Temporarily" ignored on GDB/LLDB due to debuginfo tests being disabled, see PR 47155 +//@ ignore-android: FIXME(#10381) +//@ compile-flags:-g +//@ min-gdb-version: 7.7 +//@ min-lldb-version: 310 +//@ min-cdb-version: 10.0.18317.1001 // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/pretty-uninitialized-vec.rs b/tests/debuginfo/pretty-uninitialized-vec.rs index 61791f48f4db..225b4a6d5345 100644 --- a/tests/debuginfo/pretty-uninitialized-vec.rs +++ b/tests/debuginfo/pretty-uninitialized-vec.rs @@ -1,9 +1,9 @@ -// ignore-windows failing on win32 bot -// ignore-freebsd: gdb package too new -// ignore-android: FIXME(#10381) -// compile-flags:-g -// min-gdb-version: 8.1 -// min-lldb-version: 310 +//@ ignore-windows failing on win32 bot +//@ ignore-freebsd: gdb package too new +//@ ignore-android: FIXME(#10381) +//@ compile-flags:-g +//@ min-gdb-version: 8.1 +//@ min-lldb-version: 310 // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/range-types.rs b/tests/debuginfo/range-types.rs index 7362a50a0301..8c18fd9addd4 100644 --- a/tests/debuginfo/range-types.rs +++ b/tests/debuginfo/range-types.rs @@ -1,8 +1,8 @@ // Testing the display of range types in cdb. // cdb-only -// min-cdb-version: 10.0.18317.1001 -// compile-flags:-g +//@ min-cdb-version: 10.0.18317.1001 +//@ compile-flags:-g // === CDB TESTS ================================================================================== diff --git a/tests/debuginfo/rc_arc.rs b/tests/debuginfo/rc_arc.rs index 1d07bd76eabd..3cf6635a173b 100644 --- a/tests/debuginfo/rc_arc.rs +++ b/tests/debuginfo/rc_arc.rs @@ -1,8 +1,8 @@ -// ignore-windows-gnu: pretty-printers are not loaded -// compile-flags:-g +//@ ignore-windows-gnu: pretty-printers are not loaded +//@ compile-flags:-g -// min-gdb-version: 8.1 -// min-cdb-version: 10.0.18317.1001 +//@ min-gdb-version: 8.1 +//@ min-cdb-version: 10.0.18317.1001 // === GDB TESTS ================================================================================== diff --git a/tests/debuginfo/recursive-enum.rs b/tests/debuginfo/recursive-enum.rs index a62d4807a6cd..c2c3e71b8a4f 100644 --- a/tests/debuginfo/recursive-enum.rs +++ b/tests/debuginfo/recursive-enum.rs @@ -1,6 +1,6 @@ -// ignore-lldb +//@ ignore-lldb -// compile-flags:-g +//@ compile-flags:-g // gdb-command:run // Test whether compiling a recursive enum definition crashes debug info generation. The test case diff --git a/tests/debuginfo/recursive-struct.rs b/tests/debuginfo/recursive-struct.rs index eb14af8c588d..1d039527d1ab 100644 --- a/tests/debuginfo/recursive-struct.rs +++ b/tests/debuginfo/recursive-struct.rs @@ -1,9 +1,9 @@ -// ignore-lldb +//@ ignore-lldb // Require a gdb that can read DW_TAG_variant_part. -// min-gdb-version: 8.2 +//@ min-gdb-version: 8.2 -// compile-flags:-g +//@ compile-flags:-g // gdb-command:run diff --git a/tests/debuginfo/reference-debuginfo.rs b/tests/debuginfo/reference-debuginfo.rs index 85ade170ac6f..1051cc7113c4 100644 --- a/tests/debuginfo/reference-debuginfo.rs +++ b/tests/debuginfo/reference-debuginfo.rs @@ -2,8 +2,8 @@ // That pass replaces debuginfo for `a => _x` where `_x = &b` to be `a => &b`, // and leaves codegen to create a ladder of allocations so as `*a == b`. // -// compile-flags:-g -Zmir-enable-passes=+ReferencePropagation,-ConstDebugInfo -// min-lldb-version: 310 +//@ compile-flags:-g -Zmir-enable-passes=+ReferencePropagation,-ConstDebugInfo +//@ min-lldb-version: 310 // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/regression-bad-location-list-67992.rs b/tests/debuginfo/regression-bad-location-list-67992.rs index cc7c4a0d71a3..c397b403026d 100644 --- a/tests/debuginfo/regression-bad-location-list-67992.rs +++ b/tests/debuginfo/regression-bad-location-list-67992.rs @@ -1,4 +1,4 @@ -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/result-types.rs b/tests/debuginfo/result-types.rs index f1944fa38d27..8b91d0ba27ef 100644 --- a/tests/debuginfo/result-types.rs +++ b/tests/debuginfo/result-types.rs @@ -1,6 +1,6 @@ // cdb-only -// min-cdb-version: 10.0.18317.1001 -// compile-flags:-g +//@ min-cdb-version: 10.0.18317.1001 +//@ compile-flags:-g // === CDB TESTS ================================================================================== diff --git a/tests/debuginfo/rwlock-read.rs b/tests/debuginfo/rwlock-read.rs index 7e9838871ba4..7abbfd70ffb1 100644 --- a/tests/debuginfo/rwlock-read.rs +++ b/tests/debuginfo/rwlock-read.rs @@ -1,8 +1,8 @@ // Testing the display of RwLock and RwLockReadGuard in cdb. // cdb-only -// min-cdb-version: 10.0.18317.1001 -// compile-flags:-g +//@ min-cdb-version: 10.0.18317.1001 +//@ compile-flags:-g // === CDB TESTS ================================================================================== // diff --git a/tests/debuginfo/rwlock-write.rs b/tests/debuginfo/rwlock-write.rs index 8decf54c1773..d78643036668 100644 --- a/tests/debuginfo/rwlock-write.rs +++ b/tests/debuginfo/rwlock-write.rs @@ -1,8 +1,8 @@ // Testing the display of RwLockWriteGuard. // cdb-only -// min-cdb-version: 10.0.18317.1001 -// compile-flags:-g +//@ min-cdb-version: 10.0.18317.1001 +//@ compile-flags:-g // === CDB TESTS ================================================================================== // diff --git a/tests/debuginfo/self-in-default-method.rs b/tests/debuginfo/self-in-default-method.rs index b8b5add0996a..eae1d58c1244 100644 --- a/tests/debuginfo/self-in-default-method.rs +++ b/tests/debuginfo/self-in-default-method.rs @@ -1,6 +1,6 @@ -// min-lldb-version: 310 +//@ min-lldb-version: 310 -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/self-in-generic-default-method.rs b/tests/debuginfo/self-in-generic-default-method.rs index efce449e312e..92be253e18ab 100644 --- a/tests/debuginfo/self-in-generic-default-method.rs +++ b/tests/debuginfo/self-in-generic-default-method.rs @@ -1,6 +1,6 @@ -// min-lldb-version: 310 +//@ min-lldb-version: 310 -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/shadowed-argument.rs b/tests/debuginfo/shadowed-argument.rs index 0835273ac297..33f73340a832 100644 --- a/tests/debuginfo/shadowed-argument.rs +++ b/tests/debuginfo/shadowed-argument.rs @@ -1,6 +1,6 @@ -// min-lldb-version: 310 +//@ min-lldb-version: 310 -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/shadowed-variable.rs b/tests/debuginfo/shadowed-variable.rs index 9f060811f180..60c392b15cb0 100644 --- a/tests/debuginfo/shadowed-variable.rs +++ b/tests/debuginfo/shadowed-variable.rs @@ -1,5 +1,5 @@ -// min-lldb-version: 310 -// compile-flags:-g +//@ min-lldb-version: 310 +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/should-fail.rs b/tests/debuginfo/should-fail.rs index eef6d99d2a91..f3a8f52e0fa5 100644 --- a/tests/debuginfo/should-fail.rs +++ b/tests/debuginfo/should-fail.rs @@ -1,9 +1,9 @@ -// min-lldb-version: 310 +//@ min-lldb-version: 310 // == Test [gdb|lldb]-[command|check] are parsed correctly === -// should-fail -// needs-run-enabled -// compile-flags:-g +//@ should-fail +//@ needs-run-enabled +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/simd.rs b/tests/debuginfo/simd.rs index b7bfe44b6ec4..a5dd2e61a8de 100644 --- a/tests/debuginfo/simd.rs +++ b/tests/debuginfo/simd.rs @@ -1,12 +1,12 @@ // Need a fix for LLDB first... -// ignore-lldb +//@ ignore-lldb // FIXME: LLVM generates invalid debug info for variables requiring // dynamic stack realignment, which is the case on s390x for vector // types with non-vector ABI. -// ignore-s390x +//@ ignore-s390x -// compile-flags:-g +//@ compile-flags:-g // gdb-command:run // gdbg-command:print/d vi8x16 diff --git a/tests/debuginfo/simple-lexical-scope.rs b/tests/debuginfo/simple-lexical-scope.rs index 01db79e1e66b..f4be2035d3cb 100644 --- a/tests/debuginfo/simple-lexical-scope.rs +++ b/tests/debuginfo/simple-lexical-scope.rs @@ -1,6 +1,6 @@ -// min-lldb-version: 310 +//@ min-lldb-version: 310 -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/simple-struct.rs b/tests/debuginfo/simple-struct.rs index fea8109223ad..100763f60b6f 100644 --- a/tests/debuginfo/simple-struct.rs +++ b/tests/debuginfo/simple-struct.rs @@ -1,7 +1,7 @@ -// min-lldb-version: 310 -// ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155 +//@ min-lldb-version: 310 +//@ ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155 -// compile-flags: -g -Zmir-enable-passes=-CheckAlignment +//@ compile-flags: -g -Zmir-enable-passes=-CheckAlignment // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/simple-tuple.rs b/tests/debuginfo/simple-tuple.rs index 0807cfedce01..2d8905a77bf7 100644 --- a/tests/debuginfo/simple-tuple.rs +++ b/tests/debuginfo/simple-tuple.rs @@ -1,7 +1,7 @@ -// min-lldb-version: 310 -// ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155 +//@ min-lldb-version: 310 +//@ ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155 -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/skip_second_statement.rs b/tests/debuginfo/skip_second_statement.rs index 535b54747631..e0f3325bcff5 100644 --- a/tests/debuginfo/skip_second_statement.rs +++ b/tests/debuginfo/skip_second_statement.rs @@ -1,10 +1,10 @@ -// ignore-lldb +//@ ignore-lldb // Test that statement, skipped/added/reordered by macros, is correctly processed in debuginfo. // Performed step-over and step-into debug stepping through call statements. // collapse_debuginfo feature disabled. -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/skip_second_statement_collapse.rs b/tests/debuginfo/skip_second_statement_collapse.rs index a0557ca9feec..f1a74b629e48 100644 --- a/tests/debuginfo/skip_second_statement_collapse.rs +++ b/tests/debuginfo/skip_second_statement_collapse.rs @@ -1,11 +1,11 @@ -// ignore-lldb +//@ ignore-lldb #![feature(collapse_debuginfo)] // Test that statement, skipped/added/reordered by macros, is correctly processed in debuginfo // Performed step-over and step-into debug stepping through call statements. // collapse_debuginfo feature enabled. -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/static-method-on-struct-and-enum.rs b/tests/debuginfo/static-method-on-struct-and-enum.rs index 864c61c15d14..ad078122ddeb 100644 --- a/tests/debuginfo/static-method-on-struct-and-enum.rs +++ b/tests/debuginfo/static-method-on-struct-and-enum.rs @@ -1,6 +1,6 @@ -// min-lldb-version: 310 +//@ min-lldb-version: 310 -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/step-into-match.rs b/tests/debuginfo/step-into-match.rs index 4a5f7857097a..f702b116b20b 100644 --- a/tests/debuginfo/step-into-match.rs +++ b/tests/debuginfo/step-into-match.rs @@ -1,5 +1,5 @@ -// compile-flags: -g -// ignore-android: FIXME(#10381) +//@ compile-flags: -g +//@ ignore-android: FIXME(#10381) // === GDB TESTS ============================================================== diff --git a/tests/debuginfo/struct-in-enum.rs b/tests/debuginfo/struct-in-enum.rs index 41d15af14ede..c340f71a6cc4 100644 --- a/tests/debuginfo/struct-in-enum.rs +++ b/tests/debuginfo/struct-in-enum.rs @@ -1,8 +1,8 @@ -// min-lldb-version: 310 -// ignore-gdb-version: 7.11.90 - 7.12.9 -// ignore-test // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155 +//@ min-lldb-version: 310 +//@ ignore-gdb-version: 7.11.90 - 7.12.9 +//@ ignore-test // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155 -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/struct-in-struct.rs b/tests/debuginfo/struct-in-struct.rs index a9e7797ec700..287564a36cd3 100644 --- a/tests/debuginfo/struct-in-struct.rs +++ b/tests/debuginfo/struct-in-struct.rs @@ -1,6 +1,6 @@ -// min-lldb-version: 310 +//@ min-lldb-version: 310 -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/struct-namespace.rs b/tests/debuginfo/struct-namespace.rs index 81752c269805..f9262a458d52 100644 --- a/tests/debuginfo/struct-namespace.rs +++ b/tests/debuginfo/struct-namespace.rs @@ -1,6 +1,6 @@ -// ignore-gdb -// compile-flags:-g -// min-lldb-version: 310 +//@ ignore-gdb +//@ compile-flags:-g +//@ min-lldb-version: 310 // Check that structs get placed in the correct namespace diff --git a/tests/debuginfo/struct-style-enum.rs b/tests/debuginfo/struct-style-enum.rs index 0152dd9ea9b1..2f155d2b83ee 100644 --- a/tests/debuginfo/struct-style-enum.rs +++ b/tests/debuginfo/struct-style-enum.rs @@ -1,8 +1,8 @@ // Require a gdb or lldb that can read DW_TAG_variant_part. -// min-gdb-version: 8.2 -// needs-rust-lldb +//@ min-gdb-version: 8.2 +//@ needs-rust-lldb -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/struct-with-destructor.rs b/tests/debuginfo/struct-with-destructor.rs index 4334cd9028b8..9b81136e7a88 100644 --- a/tests/debuginfo/struct-with-destructor.rs +++ b/tests/debuginfo/struct-with-destructor.rs @@ -1,6 +1,6 @@ -// min-lldb-version: 310 +//@ min-lldb-version: 310 -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/thread-names.rs b/tests/debuginfo/thread-names.rs index 2c5b3f272e04..1b9ada6fc52d 100644 --- a/tests/debuginfo/thread-names.rs +++ b/tests/debuginfo/thread-names.rs @@ -1,10 +1,10 @@ -// compile-flags:-g -// revisions: macos windows +//@ compile-flags:-g +//@ revisions: macos windows // We can't set the main thread name on Linux because it renames the process (#97191) -//[macos] only-macos -//[windows] only-windows -// ignore-sgx -// ignore-windows-gnu +//@[macos] only-macos +//@[windows] only-windows +//@ ignore-sgx +//@ ignore-windows-gnu // === GDB TESTS ================================================================================== // diff --git a/tests/debuginfo/thread.rs b/tests/debuginfo/thread.rs index 5516f4fec3ed..0415f586f5d9 100644 --- a/tests/debuginfo/thread.rs +++ b/tests/debuginfo/thread.rs @@ -1,8 +1,8 @@ // Testing the display of JoinHandle and Thread in cdb. // cdb-only -// min-cdb-version: 10.0.18317.1001 -// compile-flags:-g +//@ min-cdb-version: 10.0.18317.1001 +//@ compile-flags:-g // === CDB TESTS ================================================================================== // diff --git a/tests/debuginfo/trait-pointers.rs b/tests/debuginfo/trait-pointers.rs index e12daaf114e1..2b4dde4d3a0c 100644 --- a/tests/debuginfo/trait-pointers.rs +++ b/tests/debuginfo/trait-pointers.rs @@ -1,6 +1,6 @@ -// min-lldb-version: 310 +//@ min-lldb-version: 310 -// compile-flags:-g +//@ compile-flags:-g // gdb-command:run // lldb-command:run diff --git a/tests/debuginfo/tuple-in-struct.rs b/tests/debuginfo/tuple-in-struct.rs index 759eab8e8a0c..e36d924e9259 100644 --- a/tests/debuginfo/tuple-in-struct.rs +++ b/tests/debuginfo/tuple-in-struct.rs @@ -1,6 +1,6 @@ -// min-lldb-version: 310 +//@ min-lldb-version: 310 -// compile-flags:-g +//@ compile-flags:-g // gdb-command:run diff --git a/tests/debuginfo/tuple-in-tuple.rs b/tests/debuginfo/tuple-in-tuple.rs index 578db74e9eeb..c1cfe64a52e9 100644 --- a/tests/debuginfo/tuple-in-tuple.rs +++ b/tests/debuginfo/tuple-in-tuple.rs @@ -1,6 +1,6 @@ -// min-lldb-version: 310 +//@ min-lldb-version: 310 -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/tuple-struct.rs b/tests/debuginfo/tuple-struct.rs index b8702f970a3a..5eeb1a6eed4e 100644 --- a/tests/debuginfo/tuple-struct.rs +++ b/tests/debuginfo/tuple-struct.rs @@ -1,6 +1,6 @@ -// min-lldb-version: 310 +//@ min-lldb-version: 310 -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/tuple-style-enum.rs b/tests/debuginfo/tuple-style-enum.rs index 60f3ecbd21e2..e3e1684cc28a 100644 --- a/tests/debuginfo/tuple-style-enum.rs +++ b/tests/debuginfo/tuple-style-enum.rs @@ -1,8 +1,8 @@ // Require a gdb or lldb that can read DW_TAG_variant_part. -// min-gdb-version: 8.2 -// needs-rust-lldb +//@ min-gdb-version: 8.2 +//@ needs-rust-lldb -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/type-names.rs b/tests/debuginfo/type-names.rs index c5ce044dd53f..6831786c228d 100644 --- a/tests/debuginfo/type-names.rs +++ b/tests/debuginfo/type-names.rs @@ -1,9 +1,9 @@ -// ignore-lldb +//@ ignore-lldb // GDB changed the way that it formatted Foreign types -// min-gdb-version: 9.2 +//@ min-gdb-version: 9.2 -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/union-smoke.rs b/tests/debuginfo/union-smoke.rs index 4d4b6cc96fb5..aa57ebdc844c 100644 --- a/tests/debuginfo/union-smoke.rs +++ b/tests/debuginfo/union-smoke.rs @@ -1,9 +1,9 @@ -// min-lldb-version: 310 -// ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155 +//@ min-lldb-version: 310 +//@ ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155 -// ignore-gdb-version: 7.11.90 - 7.12.9 +//@ ignore-gdb-version: 7.11.90 - 7.12.9 -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/unique-enum.rs b/tests/debuginfo/unique-enum.rs index 1ff6f5d9cbe1..db2b4403ec66 100644 --- a/tests/debuginfo/unique-enum.rs +++ b/tests/debuginfo/unique-enum.rs @@ -1,8 +1,8 @@ // Require a gdb or lldb that can read DW_TAG_variant_part. -// min-gdb-version: 8.2 -// needs-rust-lldb +//@ min-gdb-version: 8.2 +//@ needs-rust-lldb -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/unit-type.rs b/tests/debuginfo/unit-type.rs index 7aab41a3e7c9..60b105fc53d0 100644 --- a/tests/debuginfo/unit-type.rs +++ b/tests/debuginfo/unit-type.rs @@ -1,7 +1,7 @@ -// compile-flags:-g +//@ compile-flags:-g // We only test Rust-aware versions of GDB: -// min-gdb-version: 8.2 +//@ min-gdb-version: 8.2 // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/unreachable-locals.rs b/tests/debuginfo/unreachable-locals.rs index 5787f819cb93..72effc103913 100644 --- a/tests/debuginfo/unreachable-locals.rs +++ b/tests/debuginfo/unreachable-locals.rs @@ -1,6 +1,6 @@ -// min-lldb-version: 310 +//@ min-lldb-version: 310 -// compile-flags:-g +//@ compile-flags:-g #![allow(unused_variables)] #![feature(omit_gdb_pretty_printer_section)] diff --git a/tests/debuginfo/unsized.rs b/tests/debuginfo/unsized.rs index 3b8280bc4a9e..f76376de3836 100644 --- a/tests/debuginfo/unsized.rs +++ b/tests/debuginfo/unsized.rs @@ -1,5 +1,5 @@ -// compile-flags:-g -// ignore-gdb-version: 13.1 - 99.0 +//@ compile-flags:-g +//@ ignore-gdb-version: 13.1 - 99.0 // ^ https://sourceware.org/bugzilla/show_bug.cgi?id=30330 // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/var-captured-in-nested-closure.rs b/tests/debuginfo/var-captured-in-nested-closure.rs index 537c0b50b8b6..75ab245e13e0 100644 --- a/tests/debuginfo/var-captured-in-nested-closure.rs +++ b/tests/debuginfo/var-captured-in-nested-closure.rs @@ -1,6 +1,6 @@ -// min-lldb-version: 310 +//@ min-lldb-version: 310 -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/var-captured-in-sendable-closure.rs b/tests/debuginfo/var-captured-in-sendable-closure.rs index 39930e04e4c5..b7992deef44c 100644 --- a/tests/debuginfo/var-captured-in-sendable-closure.rs +++ b/tests/debuginfo/var-captured-in-sendable-closure.rs @@ -1,6 +1,6 @@ -// min-lldb-version: 310 +//@ min-lldb-version: 310 -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/var-captured-in-stack-closure.rs b/tests/debuginfo/var-captured-in-stack-closure.rs index d68409a9d520..eb68b081a6d8 100644 --- a/tests/debuginfo/var-captured-in-stack-closure.rs +++ b/tests/debuginfo/var-captured-in-stack-closure.rs @@ -1,6 +1,6 @@ -// min-lldb-version: 310 +//@ min-lldb-version: 310 -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/vec-slices.rs b/tests/debuginfo/vec-slices.rs index de4099a7f50c..b044110fc789 100644 --- a/tests/debuginfo/vec-slices.rs +++ b/tests/debuginfo/vec-slices.rs @@ -1,6 +1,6 @@ -// min-lldb-version: 310 +//@ min-lldb-version: 310 -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/debuginfo/vec.rs b/tests/debuginfo/vec.rs index 895661816b86..27d04094e3c6 100644 --- a/tests/debuginfo/vec.rs +++ b/tests/debuginfo/vec.rs @@ -1,7 +1,7 @@ -// min-lldb-version: 310 -// ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155 +//@ min-lldb-version: 310 +//@ ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155 -// compile-flags:-g +//@ compile-flags:-g // === GDB TESTS =================================================================================== diff --git a/tests/incremental/add_private_fn_at_krate_root_cc/struct_point.rs b/tests/incremental/add_private_fn_at_krate_root_cc/struct_point.rs index ea1ea1943e97..65d363b35a67 100644 --- a/tests/incremental/add_private_fn_at_krate_root_cc/struct_point.rs +++ b/tests/incremental/add_private_fn_at_krate_root_cc/struct_point.rs @@ -2,10 +2,10 @@ // crate. This should not cause anything we use to be invalidated. // Regression test for #36168. -// revisions:cfail1 cfail2 -// compile-flags: -Z query-dep-graph -// aux-build:point.rs -// build-pass +//@ revisions:cfail1 cfail2 +//@ compile-flags: -Z query-dep-graph +//@ aux-build:point.rs +//@ build-pass #![feature(rustc_attrs)] #![feature(stmt_expr_attributes)] diff --git a/tests/incremental/async-lifetimes.rs b/tests/incremental/async-lifetimes.rs index 90a0b93b99a1..8d55e7293df8 100644 --- a/tests/incremental/async-lifetimes.rs +++ b/tests/incremental/async-lifetimes.rs @@ -1,5 +1,5 @@ -// revisions: rpass1 rpass2 -// edition:2021 +//@ revisions: rpass1 rpass2 +//@ edition:2021 // See https://github.com/rust-lang/rust/issues/98890 diff --git a/tests/incremental/auxiliary/circular-dependencies-aux.rs b/tests/incremental/auxiliary/circular-dependencies-aux.rs index 0e74eb1b2f26..e28a6a2ca0e0 100644 --- a/tests/incremental/auxiliary/circular-dependencies-aux.rs +++ b/tests/incremental/auxiliary/circular-dependencies-aux.rs @@ -1,5 +1,5 @@ -// edition: 2021 -// compile-flags: --crate-type lib --extern circular_dependencies={{build-base}}/circular-dependencies/libcircular_dependencies.rmeta --emit dep-info,metadata +//@ edition: 2021 +//@ compile-flags: --crate-type lib --extern circular_dependencies={{build-base}}/circular-dependencies/libcircular_dependencies.rmeta --emit dep-info,metadata use circular_dependencies::Foo; diff --git a/tests/incremental/auxiliary/incremental_proc_macro_aux.rs b/tests/incremental/auxiliary/incremental_proc_macro_aux.rs index 6961450b4346..505a9ee27a40 100644 --- a/tests/incremental/auxiliary/incremental_proc_macro_aux.rs +++ b/tests/incremental/auxiliary/incremental_proc_macro_aux.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/incremental/auxiliary/issue-49482-macro-def.rs b/tests/incremental/auxiliary/issue-49482-macro-def.rs index bfa7abb1a9d0..9218d6b62cbb 100644 --- a/tests/incremental/auxiliary/issue-49482-macro-def.rs +++ b/tests/incremental/auxiliary/issue-49482-macro-def.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type="proc-macro"] #![allow(non_snake_case)] diff --git a/tests/incremental/auxiliary/issue-54059.rs b/tests/incremental/auxiliary/issue-54059.rs index fa2814a77f2b..5f45403735cd 100644 --- a/tests/incremental/auxiliary/issue-54059.rs +++ b/tests/incremental/auxiliary/issue-54059.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic // check that having extern "C" functions in a proc macro doesn't crash. diff --git a/tests/incremental/auxiliary/rustc-rust-log-aux.rs b/tests/incremental/auxiliary/rustc-rust-log-aux.rs index a361373dc195..b467f8095294 100644 --- a/tests/incremental/auxiliary/rustc-rust-log-aux.rs +++ b/tests/incremental/auxiliary/rustc-rust-log-aux.rs @@ -1,4 +1,4 @@ -// rustc-env:RUSTC_LOG=debug +//@ rustc-env:RUSTC_LOG=debug #[cfg(rpass1)] pub fn foo() {} diff --git a/tests/incremental/cache_file_headers.rs b/tests/incremental/cache_file_headers.rs index 9cf611c3379e..d9b390171569 100644 --- a/tests/incremental/cache_file_headers.rs +++ b/tests/incremental/cache_file_headers.rs @@ -7,10 +7,10 @@ // The `l33t haxx0r` Rust compiler is known to produce incr. comp. artifacts // that are outrageously incompatible with just about anything, even itself: -//[rpass1] rustc-env:RUSTC_FORCE_RUSTC_VERSION="l33t haxx0r rustc 2.1 LTS" +//@[rpass1] rustc-env:RUSTC_FORCE_RUSTC_VERSION="l33t haxx0r rustc 2.1 LTS" -// revisions:rpass1 rpass2 -// compile-flags: -Z query-dep-graph +//@ revisions:rpass1 rpass2 +//@ compile-flags: -Z query-dep-graph #![feature(rustc_attrs)] #![rustc_partition_codegened(module="cache_file_headers", cfg="rpass2")] diff --git a/tests/incremental/callee_caller_cross_crate/b.rs b/tests/incremental/callee_caller_cross_crate/b.rs index 084ed232a55e..b9012ecf7f77 100644 --- a/tests/incremental/callee_caller_cross_crate/b.rs +++ b/tests/incremental/callee_caller_cross_crate/b.rs @@ -1,6 +1,6 @@ -// aux-build:a.rs -// revisions:rpass1 rpass2 -// compile-flags:-Z query-dep-graph +//@ aux-build:a.rs +//@ revisions:rpass1 rpass2 +//@ compile-flags:-Z query-dep-graph #![feature(rustc_attrs)] diff --git a/tests/incremental/change_add_field/struct_point.rs b/tests/incremental/change_add_field/struct_point.rs index 3308ea56222f..8ff992771fdc 100644 --- a/tests/incremental/change_add_field/struct_point.rs +++ b/tests/incremental/change_add_field/struct_point.rs @@ -3,9 +3,9 @@ // Fns with that type used only in their body are also recompiled, but // their callers are not. -// revisions:cfail1 cfail2 -// compile-flags: -Z query-dep-graph -// build-pass +//@ revisions:cfail1 cfail2 +//@ compile-flags: -Z query-dep-graph +//@ build-pass #![feature(rustc_attrs)] #![feature(stmt_expr_attributes)] diff --git a/tests/incremental/change_crate_dep_kind.rs b/tests/incremental/change_crate_dep_kind.rs index b9f74340472c..d3408f7ad2b3 100644 --- a/tests/incremental/change_crate_dep_kind.rs +++ b/tests/incremental/change_crate_dep_kind.rs @@ -1,12 +1,12 @@ // Test that we detect changes to the `dep_kind` query. If the change is not // detected then -Zincremental-verify-ich will trigger an assertion. -// ignore-wasm32-bare compiled with panic=abort by default -// needs-unwind -// revisions:cfail1 cfail2 -// compile-flags: -Z query-dep-graph -Cpanic=unwind -// needs-unwind -// build-pass (FIXME(62277): could be check-pass?) +//@ ignore-wasm32-bare compiled with panic=abort by default +//@ needs-unwind +//@ revisions:cfail1 cfail2 +//@ compile-flags: -Z query-dep-graph -Cpanic=unwind +//@ needs-unwind +//@ build-pass (FIXME(62277): could be check-pass?) #![feature(panic_unwind)] diff --git a/tests/incremental/change_crate_order/main.rs b/tests/incremental/change_crate_order/main.rs index 7448b54dd079..23f1782578e9 100644 --- a/tests/incremental/change_crate_order/main.rs +++ b/tests/incremental/change_crate_order/main.rs @@ -1,6 +1,6 @@ -// aux-build:a.rs -// aux-build:b.rs -// revisions:rpass1 rpass2 +//@ aux-build:a.rs +//@ aux-build:b.rs +//@ revisions:rpass1 rpass2 #![feature(rustc_attrs)] diff --git a/tests/incremental/change_implementation_cross_crate/main.rs b/tests/incremental/change_implementation_cross_crate/main.rs index dee9ebd74a89..9919b0d01cb6 100644 --- a/tests/incremental/change_implementation_cross_crate/main.rs +++ b/tests/incremental/change_implementation_cross_crate/main.rs @@ -1,9 +1,9 @@ // Test that we are able to reuse `main` despite the changes in the implementation of `foo` and // `bar`. -// revisions: rpass1 rpass2 -// aux-build: a.rs -// compile-flags: -Zquery-dep-graph +//@ revisions: rpass1 rpass2 +//@ aux-build: a.rs +//@ compile-flags: -Zquery-dep-graph #![feature(rustc_attrs)] #![crate_type = "bin"] diff --git a/tests/incremental/change_name_of_static_in_fn.rs b/tests/incremental/change_name_of_static_in_fn.rs index fd16ad2dca41..808194501866 100644 --- a/tests/incremental/change_name_of_static_in_fn.rs +++ b/tests/incremental/change_name_of_static_in_fn.rs @@ -1,4 +1,4 @@ -// revisions:rpass1 rpass2 rpass3 +//@ revisions:rpass1 rpass2 rpass3 // See issue #57692. diff --git a/tests/incremental/change_private_fn/struct_point.rs b/tests/incremental/change_private_fn/struct_point.rs index d57267adc6bd..a4c0a8db4098 100644 --- a/tests/incremental/change_private_fn/struct_point.rs +++ b/tests/incremental/change_private_fn/struct_point.rs @@ -1,9 +1,9 @@ // Test where we change the body of a private method in an impl. // We then test what sort of functions must be rebuilt as a result. -// revisions:cfail1 cfail2 -// compile-flags: -Z query-dep-graph -// build-pass (FIXME(62277): could be check-pass?) +//@ revisions:cfail1 cfail2 +//@ compile-flags: -Z query-dep-graph +//@ build-pass (FIXME(62277): could be check-pass?) #![feature(rustc_attrs)] #![feature(stmt_expr_attributes)] diff --git a/tests/incremental/change_private_fn_cc/struct_point.rs b/tests/incremental/change_private_fn_cc/struct_point.rs index 1c27ec3a3f7e..6262e32a807d 100644 --- a/tests/incremental/change_private_fn_cc/struct_point.rs +++ b/tests/incremental/change_private_fn_cc/struct_point.rs @@ -1,10 +1,10 @@ // Test where we change the body of a private method in an impl. // We then test what sort of functions must be rebuilt as a result. -// revisions:cfail1 cfail2 -// compile-flags: -Z query-dep-graph -// aux-build:point.rs -// build-pass (FIXME(62277): could be check-pass?) +//@ revisions:cfail1 cfail2 +//@ compile-flags: -Z query-dep-graph +//@ aux-build:point.rs +//@ build-pass (FIXME(62277): could be check-pass?) #![crate_type = "rlib"] #![feature(rustc_attrs)] diff --git a/tests/incremental/change_private_impl_method/struct_point.rs b/tests/incremental/change_private_impl_method/struct_point.rs index cf43e4757cb8..953d58101510 100644 --- a/tests/incremental/change_private_impl_method/struct_point.rs +++ b/tests/incremental/change_private_impl_method/struct_point.rs @@ -1,9 +1,9 @@ // Test where we change the body of a private method in an impl. // We then test what sort of functions must be rebuilt as a result. -// revisions:cfail1 cfail2 -// compile-flags: -Z query-dep-graph -// build-pass +//@ revisions:cfail1 cfail2 +//@ compile-flags: -Z query-dep-graph +//@ build-pass #![feature(rustc_attrs)] #![feature(stmt_expr_attributes)] diff --git a/tests/incremental/change_private_impl_method_cc/struct_point.rs b/tests/incremental/change_private_impl_method_cc/struct_point.rs index 9fe8b5df93a2..42cc41da4c8b 100644 --- a/tests/incremental/change_private_impl_method_cc/struct_point.rs +++ b/tests/incremental/change_private_impl_method_cc/struct_point.rs @@ -1,10 +1,10 @@ // Test where we change the body of a private method in an impl. // We then test what sort of functions must be rebuilt as a result. -// revisions:cfail1 cfail2 -// compile-flags: -Z query-dep-graph -// aux-build:point.rs -// build-pass (FIXME(62277): could be check-pass?) +//@ revisions:cfail1 cfail2 +//@ compile-flags: -Z query-dep-graph +//@ aux-build:point.rs +//@ build-pass (FIXME(62277): could be check-pass?) #![crate_type = "rlib"] #![feature(rustc_attrs)] diff --git a/tests/incremental/change_pub_inherent_method_body/struct_point.rs b/tests/incremental/change_pub_inherent_method_body/struct_point.rs index 1b87b18fcd42..e112b25df5c5 100644 --- a/tests/incremental/change_pub_inherent_method_body/struct_point.rs +++ b/tests/incremental/change_pub_inherent_method_body/struct_point.rs @@ -1,8 +1,8 @@ // Test where we change the body of a public, inherent method. -// revisions:cfail1 cfail2 -// compile-flags: -Z query-dep-graph -// build-pass +//@ revisions:cfail1 cfail2 +//@ compile-flags: -Z query-dep-graph +//@ build-pass #![crate_type = "rlib"] #![feature(rustc_attrs)] diff --git a/tests/incremental/change_pub_inherent_method_sig/struct_point.rs b/tests/incremental/change_pub_inherent_method_sig/struct_point.rs index 0a672956768a..d67011f1e88c 100644 --- a/tests/incremental/change_pub_inherent_method_sig/struct_point.rs +++ b/tests/incremental/change_pub_inherent_method_sig/struct_point.rs @@ -1,8 +1,8 @@ // Test where we change the *signature* of a public, inherent method. -// revisions:cfail1 cfail2 -// compile-flags: -Z query-dep-graph -// build-pass +//@ revisions:cfail1 cfail2 +//@ compile-flags: -Z query-dep-graph +//@ build-pass #![crate_type = "rlib"] #![feature(rustc_attrs)] diff --git a/tests/incremental/change_symbol_export_status.rs b/tests/incremental/change_symbol_export_status.rs index 83737a022009..5fc6afa74119 100644 --- a/tests/incremental/change_symbol_export_status.rs +++ b/tests/incremental/change_symbol_export_status.rs @@ -1,7 +1,7 @@ -// revisions: rpass1 rpass2 rpass3 rpass4 -// compile-flags: -Zquery-dep-graph -// [rpass1]compile-flags: -Zincremental-ignore-spans -// [rpass2]compile-flags: -Zincremental-ignore-spans +//@ revisions: rpass1 rpass2 rpass3 rpass4 +//@ compile-flags: -Zquery-dep-graph +//@ [rpass1]compile-flags: -Zincremental-ignore-spans +//@ [rpass2]compile-flags: -Zincremental-ignore-spans #![feature(rustc_attrs)] #![rustc_partition_reused(module = "change_symbol_export_status-mod1", cfg = "rpass2")] diff --git a/tests/incremental/circular-dependencies.rs b/tests/incremental/circular-dependencies.rs index 10673066a9df..320edad3fde9 100644 --- a/tests/incremental/circular-dependencies.rs +++ b/tests/incremental/circular-dependencies.rs @@ -1,9 +1,9 @@ // ignore-tidy-linelength -// revisions: cpass1 cfail2 -// edition: 2021 -// [cpass1] compile-flags: --crate-type lib --emit dep-info,metadata -// [cfail2] aux-build: circular-dependencies-aux.rs -// [cfail2] compile-flags: --test --extern aux={{build-base}}/circular-dependencies/auxiliary/libcircular_dependencies_aux.rmeta -L dependency={{build-base}}/circular-dependencies +//@ revisions: cpass1 cfail2 +//@ edition: 2021 +//@ [cpass1] compile-flags: --crate-type lib --emit dep-info,metadata +//@ [cfail2] aux-build: circular-dependencies-aux.rs +//@ [cfail2] compile-flags: --test --extern aux={{build-base}}/circular-dependencies/auxiliary/libcircular_dependencies_aux.rmeta -L dependency={{build-base}}/circular-dependencies pub struct Foo; //[cfail2]~^ NOTE `Foo` is defined in the current crate diff --git a/tests/incremental/commandline-args.rs b/tests/incremental/commandline-args.rs index 7a4c33d36e41..f7aabe1e6d00 100644 --- a/tests/incremental/commandline-args.rs +++ b/tests/incremental/commandline-args.rs @@ -1,8 +1,8 @@ // Test that changing a tracked commandline argument invalidates // the cache while changing an untracked one doesn't. -// revisions:rpass1 rpass2 rpass3 rpass4 -// compile-flags: -Z query-dep-graph +//@ revisions:rpass1 rpass2 rpass3 rpass4 +//@ compile-flags: -Z query-dep-graph #![feature(rustc_attrs)] @@ -14,10 +14,10 @@ // invalidate the cache. Between revisions 2 and 3, we are adding `--diagnostic-width` // which should have no effect on the cache. Between revisions, we are adding // `--remap-path-prefix` which should invalidate the cache: -//[rpass1] compile-flags: -C debuginfo=0 -//[rpass2] compile-flags: -C debuginfo=2 -//[rpass3] compile-flags: -C debuginfo=2 --diagnostic-width=80 -//[rpass4] compile-flags: -C debuginfo=2 --diagnostic-width=80 --remap-path-prefix=/home/bors/r=src +//@[rpass1] compile-flags: -C debuginfo=0 +//@[rpass2] compile-flags: -C debuginfo=2 +//@[rpass3] compile-flags: -C debuginfo=2 --diagnostic-width=80 +//@[rpass4] compile-flags: -C debuginfo=2 --diagnostic-width=80 --remap-path-prefix=/home/bors/r=src pub fn main() { // empty diff --git a/tests/incremental/const-generic-type-cycle.rs b/tests/incremental/const-generic-type-cycle.rs index ca7b12e9e627..cd0437f7ef66 100644 --- a/tests/incremental/const-generic-type-cycle.rs +++ b/tests/incremental/const-generic-type-cycle.rs @@ -1,9 +1,9 @@ // Verify that we do not ICE when we try to overwrite an anon-const's type because of a trait // cycle. // -// compile-flags: -Zincremental-ignore-spans -// revisions: cpass cfail -// error-pattern: cycle detected when computing type of `Bar::N` +//@ compile-flags: -Zincremental-ignore-spans +//@ revisions: cpass cfail +//@ error-pattern: cycle detected when computing type of `Bar::N` #![feature(trait_alias)] #![crate_type="lib"] diff --git a/tests/incremental/const-generics/change-const-param-gat.rs b/tests/incremental/const-generics/change-const-param-gat.rs index f1449d5681e0..9fdac0142935 100644 --- a/tests/incremental/const-generics/change-const-param-gat.rs +++ b/tests/incremental/const-generics/change-const-param-gat.rs @@ -1,5 +1,5 @@ -// revisions: rpass1 rpass2 rpass3 -// compile-flags: -Zincremental-ignore-spans +//@ revisions: rpass1 rpass2 rpass3 +//@ compile-flags: -Zincremental-ignore-spans #![feature(generic_associated_types)] // This test unsures that with_opt_const_param returns the diff --git a/tests/incremental/const-generics/change-const-param-type.rs b/tests/incremental/const-generics/change-const-param-type.rs index 1aac1bc7d722..989ad56990db 100644 --- a/tests/incremental/const-generics/change-const-param-type.rs +++ b/tests/incremental/const-generics/change-const-param-type.rs @@ -1,5 +1,5 @@ -// revisions: rpass1 rpass2 rpass3 -// compile-flags: -Zincremental-ignore-spans +//@ revisions: rpass1 rpass2 rpass3 +//@ compile-flags: -Zincremental-ignore-spans enum Foo { Variant, diff --git a/tests/incremental/const-generics/hash-tyvid-regression-1.rs b/tests/incremental/const-generics/hash-tyvid-regression-1.rs index 06d674234510..727dceb2d272 100644 --- a/tests/incremental/const-generics/hash-tyvid-regression-1.rs +++ b/tests/incremental/const-generics/hash-tyvid-regression-1.rs @@ -1,4 +1,4 @@ -// revisions: cfail +//@ revisions: cfail #![feature(generic_const_exprs, adt_const_params)] #![allow(incomplete_features)] diff --git a/tests/incremental/const-generics/hash-tyvid-regression-2.rs b/tests/incremental/const-generics/hash-tyvid-regression-2.rs index 33f226ff611e..dbac296eb4a7 100644 --- a/tests/incremental/const-generics/hash-tyvid-regression-2.rs +++ b/tests/incremental/const-generics/hash-tyvid-regression-2.rs @@ -1,4 +1,4 @@ -// revisions: cfail +//@ revisions: cfail #![feature(generic_const_exprs, adt_const_params)] #![allow(incomplete_features)] diff --git a/tests/incremental/const-generics/hash-tyvid-regression-3.rs b/tests/incremental/const-generics/hash-tyvid-regression-3.rs index 61f568f79ef9..77e87c47cdc0 100644 --- a/tests/incremental/const-generics/hash-tyvid-regression-3.rs +++ b/tests/incremental/const-generics/hash-tyvid-regression-3.rs @@ -1,4 +1,4 @@ -// revisions: cfail +//@ revisions: cfail #![feature(generic_const_exprs)] #![allow(incomplete_features)] // regression test for #79251 diff --git a/tests/incremental/const-generics/hash-tyvid-regression-4.rs b/tests/incremental/const-generics/hash-tyvid-regression-4.rs index 12e8ac7abadc..621ca16230b2 100644 --- a/tests/incremental/const-generics/hash-tyvid-regression-4.rs +++ b/tests/incremental/const-generics/hash-tyvid-regression-4.rs @@ -1,4 +1,4 @@ -// revisions: cfail +//@ revisions: cfail #![feature(generic_const_exprs)] #![allow(incomplete_features)] // regression test for #79251 diff --git a/tests/incremental/const-generics/issue-61338.rs b/tests/incremental/const-generics/issue-61338.rs index e9d67fee2969..2152667be3a3 100644 --- a/tests/incremental/const-generics/issue-61338.rs +++ b/tests/incremental/const-generics/issue-61338.rs @@ -1,4 +1,4 @@ -// revisions:rpass1 +//@ revisions:rpass1 struct Struct(T); diff --git a/tests/incremental/const-generics/issue-61516.rs b/tests/incremental/const-generics/issue-61516.rs index c781484d1e2e..9d56ca413825 100644 --- a/tests/incremental/const-generics/issue-61516.rs +++ b/tests/incremental/const-generics/issue-61516.rs @@ -1,4 +1,4 @@ -// revisions:rpass1 +//@ revisions:rpass1 struct FakeArray(T); diff --git a/tests/incremental/const-generics/issue-62536.rs b/tests/incremental/const-generics/issue-62536.rs index 022376768f2a..ebabc8576415 100644 --- a/tests/incremental/const-generics/issue-62536.rs +++ b/tests/incremental/const-generics/issue-62536.rs @@ -1,4 +1,4 @@ -// revisions:cfail1 +//@ revisions:cfail1 #![allow(unused_variables)] diff --git a/tests/incremental/const-generics/issue-64087.rs b/tests/incremental/const-generics/issue-64087.rs index 81c813531bd5..97f212b3fbba 100644 --- a/tests/incremental/const-generics/issue-64087.rs +++ b/tests/incremental/const-generics/issue-64087.rs @@ -1,4 +1,4 @@ -// revisions:cfail1 +//@ revisions:cfail1 fn combinator() -> [T; S] {} //[cfail1]~^ ERROR mismatched types diff --git a/tests/incremental/const-generics/issue-65623.rs b/tests/incremental/const-generics/issue-65623.rs index 22bbcbcabed1..aaabde8253be 100644 --- a/tests/incremental/const-generics/issue-65623.rs +++ b/tests/incremental/const-generics/issue-65623.rs @@ -1,4 +1,4 @@ -// revisions:rpass1 +//@ revisions:rpass1 pub struct Foo([T; 0]); impl Foo { diff --git a/tests/incremental/const-generics/issue-68477.rs b/tests/incremental/const-generics/issue-68477.rs index 9e35cf93d091..e9d1e8ad14df 100644 --- a/tests/incremental/const-generics/issue-68477.rs +++ b/tests/incremental/const-generics/issue-68477.rs @@ -1,5 +1,5 @@ -// edition:2018 -// revisions:rpass1 +//@ edition:2018 +//@ revisions:rpass1 // Needed to supply generic arguments to the anon const in `[(); FOO]`. #![feature(generic_const_exprs)] diff --git a/tests/incremental/const-generics/try_unify_abstract_const_regression_tests/issue-77708-1.rs b/tests/incremental/const-generics/try_unify_abstract_const_regression_tests/issue-77708-1.rs index 5c8af47ccbe8..0233a0b197ab 100644 --- a/tests/incremental/const-generics/try_unify_abstract_const_regression_tests/issue-77708-1.rs +++ b/tests/incremental/const-generics/try_unify_abstract_const_regression_tests/issue-77708-1.rs @@ -1,4 +1,4 @@ -// revisions: cfail +//@ revisions: cfail #![feature(generic_const_exprs)] #![allow(incomplete_features, unused_braces, unused_variables)] diff --git a/tests/incremental/const-generics/try_unify_abstract_const_regression_tests/issue-77708-2.rs b/tests/incremental/const-generics/try_unify_abstract_const_regression_tests/issue-77708-2.rs index 92bbcba4b38a..257a4196c0c9 100644 --- a/tests/incremental/const-generics/try_unify_abstract_const_regression_tests/issue-77708-2.rs +++ b/tests/incremental/const-generics/try_unify_abstract_const_regression_tests/issue-77708-2.rs @@ -1,4 +1,4 @@ -// revisions: rpass +//@ revisions: rpass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/incremental/const-generics/try_unify_abstract_const_regression_tests/issue-77708-3.rs b/tests/incremental/const-generics/try_unify_abstract_const_regression_tests/issue-77708-3.rs index f1c108fed11b..13767e1c82ad 100644 --- a/tests/incremental/const-generics/try_unify_abstract_const_regression_tests/issue-77708-3.rs +++ b/tests/incremental/const-generics/try_unify_abstract_const_regression_tests/issue-77708-3.rs @@ -1,4 +1,4 @@ -// revisions: rpass +//@ revisions: rpass #![feature(generic_const_exprs, adt_const_params)] #![allow(incomplete_features)] diff --git a/tests/incremental/const-generics/try_unify_abstract_const_regression_tests/issue-82034.rs b/tests/incremental/const-generics/try_unify_abstract_const_regression_tests/issue-82034.rs index c05d8355c280..54450abf2a43 100644 --- a/tests/incremental/const-generics/try_unify_abstract_const_regression_tests/issue-82034.rs +++ b/tests/incremental/const-generics/try_unify_abstract_const_regression_tests/issue-82034.rs @@ -1,4 +1,4 @@ -// revisions: rpass +//@ revisions: rpass #![feature(generic_const_exprs)] #![allow(incomplete_features)] pub trait IsTrue {} diff --git a/tests/incremental/const-generics/try_unify_abstract_const_regression_tests/issue-85031-1.rs b/tests/incremental/const-generics/try_unify_abstract_const_regression_tests/issue-85031-1.rs index 8886a556dbb2..ccdc9615cbff 100644 --- a/tests/incremental/const-generics/try_unify_abstract_const_regression_tests/issue-85031-1.rs +++ b/tests/incremental/const-generics/try_unify_abstract_const_regression_tests/issue-85031-1.rs @@ -1,4 +1,4 @@ -// revisions: rpass +//@ revisions: rpass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/incremental/const-generics/try_unify_abstract_const_regression_tests/issue-85031-3.rs b/tests/incremental/const-generics/try_unify_abstract_const_regression_tests/issue-85031-3.rs index 5b2f5edc8500..a8878a5c88e9 100644 --- a/tests/incremental/const-generics/try_unify_abstract_const_regression_tests/issue-85031-3.rs +++ b/tests/incremental/const-generics/try_unify_abstract_const_regression_tests/issue-85031-3.rs @@ -1,4 +1,4 @@ -// revisions: rpass +//@ revisions: rpass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/incremental/const-generics/try_unify_abstract_const_regression_tests/issue-86953.rs b/tests/incremental/const-generics/try_unify_abstract_const_regression_tests/issue-86953.rs index d659c5676336..a67a242d223f 100644 --- a/tests/incremental/const-generics/try_unify_abstract_const_regression_tests/issue-86953.rs +++ b/tests/incremental/const-generics/try_unify_abstract_const_regression_tests/issue-86953.rs @@ -1,4 +1,4 @@ -// revisions: rpass +//@ revisions: rpass #![feature(generic_const_exprs)] #![allow(incomplete_features)] diff --git a/tests/incremental/const-generics/try_unify_abstract_const_regression_tests/issue-88022.rs b/tests/incremental/const-generics/try_unify_abstract_const_regression_tests/issue-88022.rs index 5f5435ba9f28..99eb92f432c2 100644 --- a/tests/incremental/const-generics/try_unify_abstract_const_regression_tests/issue-88022.rs +++ b/tests/incremental/const-generics/try_unify_abstract_const_regression_tests/issue-88022.rs @@ -1,4 +1,4 @@ -// revisions: cfail +//@ revisions: cfail #![feature(generic_const_exprs)] #![allow(incomplete_features, unused_braces)] diff --git a/tests/incremental/crate_hash_reorder.rs b/tests/incremental/crate_hash_reorder.rs index ca476b4d2db1..bd26d604a825 100644 --- a/tests/incremental/crate_hash_reorder.rs +++ b/tests/incremental/crate_hash_reorder.rs @@ -1,7 +1,7 @@ // Test that the crate hash is not affected by reordering items. -// revisions:rpass1 rpass2 rpass3 -// compile-flags: -Z query-dep-graph +//@ revisions:rpass1 rpass2 rpass3 +//@ compile-flags: -Z query-dep-graph #![feature(rustc_attrs)] diff --git a/tests/incremental/cyclic-trait-hierarchy.rs b/tests/incremental/cyclic-trait-hierarchy.rs index b502e7207d56..6a6aedee8320 100644 --- a/tests/incremental/cyclic-trait-hierarchy.rs +++ b/tests/incremental/cyclic-trait-hierarchy.rs @@ -1,6 +1,6 @@ // Adapted from rust-lang/rust#58813 -// revisions: rpass1 cfail2 +//@ revisions: rpass1 cfail2 #[cfg(rpass1)] pub trait T2 {} diff --git a/tests/incremental/delayed_span_bug.rs b/tests/incremental/delayed_span_bug.rs index 5c9d3c2c1d52..958e9dd07e2d 100644 --- a/tests/incremental/delayed_span_bug.rs +++ b/tests/incremental/delayed_span_bug.rs @@ -1,6 +1,6 @@ -// revisions: cfail1 cfail2 -// should-ice -// error-pattern: delayed bug triggered by #[rustc_error(delayed_bug_from_inside_query)] +//@ revisions: cfail1 cfail2 +//@ should-ice +//@ error-pattern: delayed bug triggered by #[rustc_error(delayed_bug_from_inside_query)] #![feature(rustc_attrs)] diff --git a/tests/incremental/dirty_clean.rs b/tests/incremental/dirty_clean.rs index e6379286805e..24aedb011c6b 100644 --- a/tests/incremental/dirty_clean.rs +++ b/tests/incremental/dirty_clean.rs @@ -1,5 +1,5 @@ -// revisions: rpass1 cfail2 -// compile-flags: -Z query-dep-graph +//@ revisions: rpass1 cfail2 +//@ compile-flags: -Z query-dep-graph #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/tests/incremental/extern_static/issue-49153.rs b/tests/incremental/extern_static/issue-49153.rs index f1dbac288853..72340173b5ca 100644 --- a/tests/incremental/extern_static/issue-49153.rs +++ b/tests/incremental/extern_static/issue-49153.rs @@ -1,6 +1,6 @@ // https://github.com/rust-lang/rust/issues/49153 -// revisions:rpass1 rpass2 +//@ revisions:rpass1 rpass2 extern "C" { pub static __ImageBase: u8; diff --git a/tests/incremental/feature_gate.rs b/tests/incremental/feature_gate.rs index 5317a9962f47..54c2dbb352e1 100644 --- a/tests/incremental/feature_gate.rs +++ b/tests/incremental/feature_gate.rs @@ -1,7 +1,7 @@ // This test makes sure that we detect changed feature gates. -// revisions:rpass1 cfail2 -// compile-flags: -Z query-dep-graph +//@ revisions:rpass1 cfail2 +//@ compile-flags: -Z query-dep-graph #![feature(rustc_attrs)] #![cfg_attr(rpass1, feature(abi_unadjusted))] diff --git a/tests/incremental/foreign.rs b/tests/incremental/foreign.rs index f46f92eb5002..cb040fe1296d 100644 --- a/tests/incremental/foreign.rs +++ b/tests/incremental/foreign.rs @@ -1,8 +1,8 @@ // Test what happens we save incremental compilation state that makes // use of foreign items. This used to ICE (#34991). -// ignore-sgx no libc +//@ ignore-sgx no libc -// revisions: rpass1 +//@ revisions: rpass1 #![feature(rustc_private)] diff --git a/tests/incremental/hash-module-order.rs b/tests/incremental/hash-module-order.rs index 2e71884a531a..c29e1e5b64c9 100644 --- a/tests/incremental/hash-module-order.rs +++ b/tests/incremental/hash-module-order.rs @@ -1,5 +1,5 @@ -// revisions: rpass1 rpass2 -// compile-flags: -Z incremental-ignore-spans -Z query-dep-graph +//@ revisions: rpass1 rpass2 +//@ compile-flags: -Z incremental-ignore-spans -Z query-dep-graph // Tests that module hashing depends on the order of the items // (since the order is exposed through `Mod.item_ids`). diff --git a/tests/incremental/hashes/call_expressions.rs b/tests/incremental/hashes/call_expressions.rs index bad2e10e497d..36b6980bcc67 100644 --- a/tests/incremental/hashes/call_expressions.rs +++ b/tests/incremental/hashes/call_expressions.rs @@ -5,12 +5,12 @@ // and make sure that the hash has changed, then change nothing between rev2 and // rev3 and make sure that the hash has not changed. -// build-pass (FIXME(62277): could be check-pass?) -// revisions: cfail1 cfail2 cfail3 cfail4 cfail5 cfail6 -// compile-flags: -Z query-dep-graph -O -// [cfail1]compile-flags: -Zincremental-ignore-spans -// [cfail2]compile-flags: -Zincremental-ignore-spans -// [cfail3]compile-flags: -Zincremental-ignore-spans +//@ build-pass (FIXME(62277): could be check-pass?) +//@ revisions: cfail1 cfail2 cfail3 cfail4 cfail5 cfail6 +//@ compile-flags: -Z query-dep-graph -O +//@ [cfail1]compile-flags: -Zincremental-ignore-spans +//@ [cfail2]compile-flags: -Zincremental-ignore-spans +//@ [cfail3]compile-flags: -Zincremental-ignore-spans #![allow(warnings)] diff --git a/tests/incremental/hashes/closure_expressions.rs b/tests/incremental/hashes/closure_expressions.rs index 0173d129b239..e548e0b6ddc3 100644 --- a/tests/incremental/hashes/closure_expressions.rs +++ b/tests/incremental/hashes/closure_expressions.rs @@ -5,12 +5,12 @@ // and make sure that the hash has changed, then change nothing between rev2 and // rev3 and make sure that the hash has not changed. -// build-pass (FIXME(62277): could be check-pass?) -// revisions: cfail1 cfail2 cfail3 cfail4 cfail5 cfail6 -// compile-flags: -Z query-dep-graph -O -// [cfail1]compile-flags: -Zincremental-ignore-spans -// [cfail2]compile-flags: -Zincremental-ignore-spans -// [cfail3]compile-flags: -Zincremental-ignore-spans +//@ build-pass (FIXME(62277): could be check-pass?) +//@ revisions: cfail1 cfail2 cfail3 cfail4 cfail5 cfail6 +//@ compile-flags: -Z query-dep-graph -O +//@ [cfail1]compile-flags: -Zincremental-ignore-spans +//@ [cfail2]compile-flags: -Zincremental-ignore-spans +//@ [cfail3]compile-flags: -Zincremental-ignore-spans #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/tests/incremental/hashes/consts.rs b/tests/incremental/hashes/consts.rs index 138618a982d2..bd5cc89caa86 100644 --- a/tests/incremental/hashes/consts.rs +++ b/tests/incremental/hashes/consts.rs @@ -5,9 +5,9 @@ // and make sure that the hash has changed, then change nothing between rev2 and // rev3 and make sure that the hash has not changed. -// build-pass (FIXME(62277): could be check-pass?) -// revisions: cfail1 cfail2 cfail3 -// compile-flags: -Z query-dep-graph -O +//@ build-pass (FIXME(62277): could be check-pass?) +//@ revisions: cfail1 cfail2 cfail3 +//@ compile-flags: -Z query-dep-graph -O #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/tests/incremental/hashes/enum_constructors.rs b/tests/incremental/hashes/enum_constructors.rs index 1e0db8ffc928..d839dabf293a 100644 --- a/tests/incremental/hashes/enum_constructors.rs +++ b/tests/incremental/hashes/enum_constructors.rs @@ -5,12 +5,12 @@ // and make sure that the hash has changed, then change nothing between rev2 and // rev3 and make sure that the hash has not changed. -// build-pass (FIXME(62277): could be check-pass?) -// revisions: cfail1 cfail2 cfail3 cfail4 cfail5 cfail6 -// compile-flags: -Z query-dep-graph -O -// [cfail1]compile-flags: -Zincremental-ignore-spans -// [cfail2]compile-flags: -Zincremental-ignore-spans -// [cfail3]compile-flags: -Zincremental-ignore-spans +//@ build-pass (FIXME(62277): could be check-pass?) +//@ revisions: cfail1 cfail2 cfail3 cfail4 cfail5 cfail6 +//@ compile-flags: -Z query-dep-graph -O +//@ [cfail1]compile-flags: -Zincremental-ignore-spans +//@ [cfail2]compile-flags: -Zincremental-ignore-spans +//@ [cfail3]compile-flags: -Zincremental-ignore-spans #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/tests/incremental/hashes/enum_defs.rs b/tests/incremental/hashes/enum_defs.rs index 2293d15b97f2..bc1a2a31e97a 100644 --- a/tests/incremental/hashes/enum_defs.rs +++ b/tests/incremental/hashes/enum_defs.rs @@ -10,12 +10,12 @@ // results in a change of the ICH for the enum's metadata, and that it stays // the same between rev2 and rev3. -// build-pass (FIXME(62277): could be check-pass?) -// revisions: cfail1 cfail2 cfail3 cfail4 cfail5 cfail6 -// compile-flags: -Z query-dep-graph -O -// [cfail1]compile-flags: -Zincremental-ignore-spans -// [cfail2]compile-flags: -Zincremental-ignore-spans -// [cfail3]compile-flags: -Zincremental-ignore-spans +//@ build-pass (FIXME(62277): could be check-pass?) +//@ revisions: cfail1 cfail2 cfail3 cfail4 cfail5 cfail6 +//@ compile-flags: -Z query-dep-graph -O +//@ [cfail1]compile-flags: -Zincremental-ignore-spans +//@ [cfail2]compile-flags: -Zincremental-ignore-spans +//@ [cfail3]compile-flags: -Zincremental-ignore-spans #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/tests/incremental/hashes/exported_vs_not.rs b/tests/incremental/hashes/exported_vs_not.rs index 358ba1d93d1a..1bd7756c1c6e 100644 --- a/tests/incremental/hashes/exported_vs_not.rs +++ b/tests/incremental/hashes/exported_vs_not.rs @@ -1,9 +1,9 @@ -// build-pass (FIXME(62277): could be check-pass?) -// revisions: cfail1 cfail2 cfail3 cfail4 cfail5 cfail6 -// compile-flags: -Z query-dep-graph -O -// [cfail1]compile-flags: -Zincremental-ignore-spans -// [cfail2]compile-flags: -Zincremental-ignore-spans -// [cfail3]compile-flags: -Zincremental-ignore-spans +//@ build-pass (FIXME(62277): could be check-pass?) +//@ revisions: cfail1 cfail2 cfail3 cfail4 cfail5 cfail6 +//@ compile-flags: -Z query-dep-graph -O +//@ [cfail1]compile-flags: -Zincremental-ignore-spans +//@ [cfail2]compile-flags: -Zincremental-ignore-spans +//@ [cfail3]compile-flags: -Zincremental-ignore-spans #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/tests/incremental/hashes/extern_mods.rs b/tests/incremental/hashes/extern_mods.rs index efac5c91658c..c26fc90dd01e 100644 --- a/tests/incremental/hashes/extern_mods.rs +++ b/tests/incremental/hashes/extern_mods.rs @@ -5,12 +5,12 @@ // and make sure that the hash has changed, then change nothing between rev2 and // rev3 and make sure that the hash has not changed. -// build-pass (FIXME(62277): could be check-pass?) -// revisions: cfail1 cfail2 cfail3 cfail4 cfail5 cfail6 -// compile-flags: -Z query-dep-graph -O -// [cfail1]compile-flags: -Zincremental-ignore-spans -// [cfail2]compile-flags: -Zincremental-ignore-spans -// [cfail3]compile-flags: -Zincremental-ignore-spans +//@ build-pass (FIXME(62277): could be check-pass?) +//@ revisions: cfail1 cfail2 cfail3 cfail4 cfail5 cfail6 +//@ compile-flags: -Z query-dep-graph -O +//@ [cfail1]compile-flags: -Zincremental-ignore-spans +//@ [cfail2]compile-flags: -Zincremental-ignore-spans +//@ [cfail3]compile-flags: -Zincremental-ignore-spans #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/tests/incremental/hashes/for_loops.rs b/tests/incremental/hashes/for_loops.rs index e297fcdd329d..9cd99bf76b7a 100644 --- a/tests/incremental/hashes/for_loops.rs +++ b/tests/incremental/hashes/for_loops.rs @@ -5,12 +5,12 @@ // and make sure that the hash has changed, then change nothing between rev2 and // rev3 and make sure that the hash has not changed. -// build-pass (FIXME(62277): could be check-pass?) -// revisions: cfail1 cfail2 cfail3 cfail4 cfail5 cfail6 -// compile-flags: -Z query-dep-graph -O -// [cfail1]compile-flags: -Zincremental-ignore-spans -// [cfail2]compile-flags: -Zincremental-ignore-spans -// [cfail3]compile-flags: -Zincremental-ignore-spans +//@ build-pass (FIXME(62277): could be check-pass?) +//@ revisions: cfail1 cfail2 cfail3 cfail4 cfail5 cfail6 +//@ compile-flags: -Z query-dep-graph -O +//@ [cfail1]compile-flags: -Zincremental-ignore-spans +//@ [cfail2]compile-flags: -Zincremental-ignore-spans +//@ [cfail3]compile-flags: -Zincremental-ignore-spans #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/tests/incremental/hashes/function_interfaces.rs b/tests/incremental/hashes/function_interfaces.rs index 5ba4781c5f1c..3be30fab99cf 100644 --- a/tests/incremental/hashes/function_interfaces.rs +++ b/tests/incremental/hashes/function_interfaces.rs @@ -5,12 +5,12 @@ // and make sure that the hash has changed, then change nothing between rev2 and // rev3 and make sure that the hash has not changed. -// build-pass (FIXME(62277): could be check-pass?) -// revisions: cfail1 cfail2 cfail3 cfail4 cfail5 cfail6 -// compile-flags: -Z query-dep-graph -O -// [cfail1]compile-flags: -Zincremental-ignore-spans -// [cfail2]compile-flags: -Zincremental-ignore-spans -// [cfail3]compile-flags: -Zincremental-ignore-spans +//@ build-pass (FIXME(62277): could be check-pass?) +//@ revisions: cfail1 cfail2 cfail3 cfail4 cfail5 cfail6 +//@ compile-flags: -Z query-dep-graph -O +//@ [cfail1]compile-flags: -Zincremental-ignore-spans +//@ [cfail2]compile-flags: -Zincremental-ignore-spans +//@ [cfail3]compile-flags: -Zincremental-ignore-spans #![allow(warnings)] #![feature(linkage)] diff --git a/tests/incremental/hashes/if_expressions.rs b/tests/incremental/hashes/if_expressions.rs index 430a6015bd5a..a21625c4f4ed 100644 --- a/tests/incremental/hashes/if_expressions.rs +++ b/tests/incremental/hashes/if_expressions.rs @@ -5,12 +5,12 @@ // and make sure that the hash has changed, then change nothing between rev2 and // rev3 and make sure that the hash has not changed. -// build-pass (FIXME(62277): could be check-pass?) -// revisions: cfail1 cfail2 cfail3 cfail4 cfail5 cfail6 -// compile-flags: -Z query-dep-graph -O -// [cfail1]compile-flags: -Zincremental-ignore-spans -// [cfail2]compile-flags: -Zincremental-ignore-spans -// [cfail3]compile-flags: -Zincremental-ignore-spans +//@ build-pass (FIXME(62277): could be check-pass?) +//@ revisions: cfail1 cfail2 cfail3 cfail4 cfail5 cfail6 +//@ compile-flags: -Z query-dep-graph -O +//@ [cfail1]compile-flags: -Zincremental-ignore-spans +//@ [cfail2]compile-flags: -Zincremental-ignore-spans +//@ [cfail3]compile-flags: -Zincremental-ignore-spans #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/tests/incremental/hashes/indexing_expressions.rs b/tests/incremental/hashes/indexing_expressions.rs index f07550305f12..1b90483c50c3 100644 --- a/tests/incremental/hashes/indexing_expressions.rs +++ b/tests/incremental/hashes/indexing_expressions.rs @@ -5,12 +5,12 @@ // and make sure that the hash has changed, then change nothing between rev2 and // rev3 and make sure that the hash has not changed. -// build-pass (FIXME(62277): could be check-pass?) -// revisions: cfail1 cfail2 cfail3 cfail4 cfail5 cfail6 -// compile-flags: -Z query-dep-graph -O -// [cfail1]compile-flags: -Zincremental-ignore-spans -// [cfail2]compile-flags: -Zincremental-ignore-spans -// [cfail3]compile-flags: -Zincremental-ignore-spans +//@ build-pass (FIXME(62277): could be check-pass?) +//@ revisions: cfail1 cfail2 cfail3 cfail4 cfail5 cfail6 +//@ compile-flags: -Z query-dep-graph -O +//@ [cfail1]compile-flags: -Zincremental-ignore-spans +//@ [cfail2]compile-flags: -Zincremental-ignore-spans +//@ [cfail3]compile-flags: -Zincremental-ignore-spans #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/tests/incremental/hashes/inherent_impls.rs b/tests/incremental/hashes/inherent_impls.rs index a2b3dcdc1587..2b0de1edc0c6 100644 --- a/tests/incremental/hashes/inherent_impls.rs +++ b/tests/incremental/hashes/inherent_impls.rs @@ -5,12 +5,12 @@ // and make sure that the hash has changed, then change nothing between rev2 and // rev3 and make sure that the hash has not changed. -// build-pass (FIXME(62277): could be check-pass?) -// revisions: cfail1 cfail2 cfail3 cfail4 cfail5 cfail6 -// compile-flags: -Z query-dep-graph -O -// [cfail1]compile-flags: -Zincremental-ignore-spans -// [cfail2]compile-flags: -Zincremental-ignore-spans -// [cfail3]compile-flags: -Zincremental-ignore-spans +//@ build-pass (FIXME(62277): could be check-pass?) +//@ revisions: cfail1 cfail2 cfail3 cfail4 cfail5 cfail6 +//@ compile-flags: -Z query-dep-graph -O +//@ [cfail1]compile-flags: -Zincremental-ignore-spans +//@ [cfail2]compile-flags: -Zincremental-ignore-spans +//@ [cfail3]compile-flags: -Zincremental-ignore-spans #![allow(warnings)] diff --git a/tests/incremental/hashes/inline_asm.rs b/tests/incremental/hashes/inline_asm.rs index 1570030dbeae..105ca7611356 100644 --- a/tests/incremental/hashes/inline_asm.rs +++ b/tests/incremental/hashes/inline_asm.rs @@ -5,13 +5,13 @@ // and make sure that the hash has changed, then change nothing between rev2 and // rev3 and make sure that the hash has not changed. -// build-pass (FIXME(62277): could be check-pass?) -// revisions: cfail1 cfail2 cfail3 cfail4 cfail5 cfail6 -// compile-flags: -Z query-dep-graph -O -// needs-asm-support -// [cfail1]compile-flags: -Zincremental-ignore-spans -// [cfail2]compile-flags: -Zincremental-ignore-spans -// [cfail3]compile-flags: -Zincremental-ignore-spans +//@ build-pass (FIXME(62277): could be check-pass?) +//@ revisions: cfail1 cfail2 cfail3 cfail4 cfail5 cfail6 +//@ compile-flags: -Z query-dep-graph -O +//@ needs-asm-support +//@ [cfail1]compile-flags: -Zincremental-ignore-spans +//@ [cfail2]compile-flags: -Zincremental-ignore-spans +//@ [cfail3]compile-flags: -Zincremental-ignore-spans #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/tests/incremental/hashes/let_expressions.rs b/tests/incremental/hashes/let_expressions.rs index 62a91bf75f8a..86578855699b 100644 --- a/tests/incremental/hashes/let_expressions.rs +++ b/tests/incremental/hashes/let_expressions.rs @@ -5,12 +5,12 @@ // and make sure that the hash has changed, then change nothing between rev2 and // rev3 and make sure that the hash has not changed. -// build-pass (FIXME(62277): could be check-pass?) -// revisions: cfail1 cfail2 cfail3 cfail4 cfail5 cfail6 -// compile-flags: -Z query-dep-graph -O -// [cfail1]compile-flags: -Zincremental-ignore-spans -// [cfail2]compile-flags: -Zincremental-ignore-spans -// [cfail3]compile-flags: -Zincremental-ignore-spans +//@ build-pass (FIXME(62277): could be check-pass?) +//@ revisions: cfail1 cfail2 cfail3 cfail4 cfail5 cfail6 +//@ compile-flags: -Z query-dep-graph -O +//@ [cfail1]compile-flags: -Zincremental-ignore-spans +//@ [cfail2]compile-flags: -Zincremental-ignore-spans +//@ [cfail3]compile-flags: -Zincremental-ignore-spans #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/tests/incremental/hashes/loop_expressions.rs b/tests/incremental/hashes/loop_expressions.rs index 810ba877061c..631699d3d687 100644 --- a/tests/incremental/hashes/loop_expressions.rs +++ b/tests/incremental/hashes/loop_expressions.rs @@ -5,12 +5,12 @@ // and make sure that the hash has changed, then change nothing between rev2 and // rev3 and make sure that the hash has not changed. -// build-pass (FIXME(62277): could be check-pass?) -// revisions: cfail1 cfail2 cfail3 cfail4 cfail5 cfail6 -// compile-flags: -Z query-dep-graph -O -// [cfail1]compile-flags: -Zincremental-ignore-spans -// [cfail2]compile-flags: -Zincremental-ignore-spans -// [cfail3]compile-flags: -Zincremental-ignore-spans +//@ build-pass (FIXME(62277): could be check-pass?) +//@ revisions: cfail1 cfail2 cfail3 cfail4 cfail5 cfail6 +//@ compile-flags: -Z query-dep-graph -O +//@ [cfail1]compile-flags: -Zincremental-ignore-spans +//@ [cfail2]compile-flags: -Zincremental-ignore-spans +//@ [cfail3]compile-flags: -Zincremental-ignore-spans #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/tests/incremental/hashes/match_expressions.rs b/tests/incremental/hashes/match_expressions.rs index c77ac27d4962..9ed5b55fb250 100644 --- a/tests/incremental/hashes/match_expressions.rs +++ b/tests/incremental/hashes/match_expressions.rs @@ -5,12 +5,12 @@ // and make sure that the hash has changed, then change nothing between rev2 and // rev3 and make sure that the hash has not changed. -// build-pass (FIXME(62277): could be check-pass?) -// revisions: cfail1 cfail2 cfail3 cfail4 cfail5 cfail6 -// compile-flags: -Z query-dep-graph -O -// [cfail1]compile-flags: -Zincremental-ignore-spans -// [cfail2]compile-flags: -Zincremental-ignore-spans -// [cfail3]compile-flags: -Zincremental-ignore-spans +//@ build-pass (FIXME(62277): could be check-pass?) +//@ revisions: cfail1 cfail2 cfail3 cfail4 cfail5 cfail6 +//@ compile-flags: -Z query-dep-graph -O +//@ [cfail1]compile-flags: -Zincremental-ignore-spans +//@ [cfail2]compile-flags: -Zincremental-ignore-spans +//@ [cfail3]compile-flags: -Zincremental-ignore-spans #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/tests/incremental/hashes/panic_exprs.rs b/tests/incremental/hashes/panic_exprs.rs index 440a7b6fbf41..509e111edc7a 100644 --- a/tests/incremental/hashes/panic_exprs.rs +++ b/tests/incremental/hashes/panic_exprs.rs @@ -8,9 +8,9 @@ // and make sure that the hash has changed, then change nothing between rev2 and // rev3 and make sure that the hash has not changed. -// build-pass (FIXME(62277): could be check-pass?) -// revisions: cfail1 cfail2 cfail3 -// compile-flags: -Z query-dep-graph -C debug-assertions -O +//@ build-pass (FIXME(62277): could be check-pass?) +//@ revisions: cfail1 cfail2 cfail3 +//@ compile-flags: -Z query-dep-graph -C debug-assertions -O #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/tests/incremental/hashes/statics.rs b/tests/incremental/hashes/statics.rs index 7e2ccc4ce6f2..9ea21d84ba15 100644 --- a/tests/incremental/hashes/statics.rs +++ b/tests/incremental/hashes/statics.rs @@ -5,12 +5,12 @@ // and make sure that the hash has changed, then change nothing between rev2 and // rev3 and make sure that the hash has not changed. -// build-pass (FIXME(62277): could be check-pass?) -// revisions: cfail1 cfail2 cfail3 cfail4 cfail5 cfail6 -// compile-flags: -Z query-dep-graph -O -// [cfail1]compile-flags: -Zincremental-ignore-spans -// [cfail2]compile-flags: -Zincremental-ignore-spans -// [cfail3]compile-flags: -Zincremental-ignore-spans +//@ build-pass (FIXME(62277): could be check-pass?) +//@ revisions: cfail1 cfail2 cfail3 cfail4 cfail5 cfail6 +//@ compile-flags: -Z query-dep-graph -O +//@ [cfail1]compile-flags: -Zincremental-ignore-spans +//@ [cfail2]compile-flags: -Zincremental-ignore-spans +//@ [cfail3]compile-flags: -Zincremental-ignore-spans #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/tests/incremental/hashes/struct_constructors.rs b/tests/incremental/hashes/struct_constructors.rs index 458f4d1a6d7d..31c549c6e7a9 100644 --- a/tests/incremental/hashes/struct_constructors.rs +++ b/tests/incremental/hashes/struct_constructors.rs @@ -5,12 +5,12 @@ // and make sure that the hash has changed, then change nothing between rev2 and // rev3 and make sure that the hash has not changed. -// build-pass (FIXME(62277): could be check-pass?) -// revisions: cfail1 cfail2 cfail3 cfail4 cfail5 cfail6 -// compile-flags: -Z query-dep-graph -O -// [cfail1]compile-flags: -Zincremental-ignore-spans -// [cfail2]compile-flags: -Zincremental-ignore-spans -// [cfail3]compile-flags: -Zincremental-ignore-spans +//@ build-pass (FIXME(62277): could be check-pass?) +//@ revisions: cfail1 cfail2 cfail3 cfail4 cfail5 cfail6 +//@ compile-flags: -Z query-dep-graph -O +//@ [cfail1]compile-flags: -Zincremental-ignore-spans +//@ [cfail2]compile-flags: -Zincremental-ignore-spans +//@ [cfail3]compile-flags: -Zincremental-ignore-spans #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/tests/incremental/hashes/struct_defs.rs b/tests/incremental/hashes/struct_defs.rs index 113ada2855d1..06ea08733979 100644 --- a/tests/incremental/hashes/struct_defs.rs +++ b/tests/incremental/hashes/struct_defs.rs @@ -10,12 +10,12 @@ // results in a change of the ICH for the struct's metadata, and that it stays // the same between rev2 and rev3. -// build-pass (FIXME(62277): could be check-pass?) -// revisions: cfail1 cfail2 cfail3 cfail4 cfail5 cfail6 -// compile-flags: -Z query-dep-graph -O -// [cfail1]compile-flags: -Zincremental-ignore-spans -// [cfail2]compile-flags: -Zincremental-ignore-spans -// [cfail3]compile-flags: -Zincremental-ignore-spans +//@ build-pass (FIXME(62277): could be check-pass?) +//@ revisions: cfail1 cfail2 cfail3 cfail4 cfail5 cfail6 +//@ compile-flags: -Z query-dep-graph -O +//@ [cfail1]compile-flags: -Zincremental-ignore-spans +//@ [cfail2]compile-flags: -Zincremental-ignore-spans +//@ [cfail3]compile-flags: -Zincremental-ignore-spans #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/tests/incremental/hashes/trait_defs.rs b/tests/incremental/hashes/trait_defs.rs index 60faf3c47d69..cb8716d90b07 100644 --- a/tests/incremental/hashes/trait_defs.rs +++ b/tests/incremental/hashes/trait_defs.rs @@ -10,12 +10,12 @@ // results in a change of the ICH for the trait's metadata, and that it stays // the same between rev2 and rev3. -// build-pass (FIXME(62277): could be check-pass?) -// revisions: cfail1 cfail2 cfail3 cfail4 cfail5 cfail6 -// compile-flags: -Z query-dep-graph -O -// [cfail1]compile-flags: -Zincremental-ignore-spans -// [cfail2]compile-flags: -Zincremental-ignore-spans -// [cfail3]compile-flags: -Zincremental-ignore-spans +//@ build-pass (FIXME(62277): could be check-pass?) +//@ revisions: cfail1 cfail2 cfail3 cfail4 cfail5 cfail6 +//@ compile-flags: -Z query-dep-graph -O +//@ [cfail1]compile-flags: -Zincremental-ignore-spans +//@ [cfail2]compile-flags: -Zincremental-ignore-spans +//@ [cfail3]compile-flags: -Zincremental-ignore-spans #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/tests/incremental/hashes/trait_impls.rs b/tests/incremental/hashes/trait_impls.rs index e103be0a0856..a5003a8d4326 100644 --- a/tests/incremental/hashes/trait_impls.rs +++ b/tests/incremental/hashes/trait_impls.rs @@ -5,12 +5,12 @@ // and make sure that the hash has changed, then change nothing between rev2 and // rev3 and make sure that the hash has not changed. -// build-pass (FIXME(62277): could be check-pass?) -// revisions: cfail1 cfail2 cfail3 cfail4 cfail5 cfail6 -// compile-flags: -Z query-dep-graph -O -// [cfail1]compile-flags: -Zincremental-ignore-spans -// [cfail2]compile-flags: -Zincremental-ignore-spans -// [cfail3]compile-flags: -Zincremental-ignore-spans +//@ build-pass (FIXME(62277): could be check-pass?) +//@ revisions: cfail1 cfail2 cfail3 cfail4 cfail5 cfail6 +//@ compile-flags: -Z query-dep-graph -O +//@ [cfail1]compile-flags: -Zincremental-ignore-spans +//@ [cfail2]compile-flags: -Zincremental-ignore-spans +//@ [cfail3]compile-flags: -Zincremental-ignore-spans #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/tests/incremental/hashes/type_defs.rs b/tests/incremental/hashes/type_defs.rs index 6b0dac1fe69b..137bffd9aeb6 100644 --- a/tests/incremental/hashes/type_defs.rs +++ b/tests/incremental/hashes/type_defs.rs @@ -10,9 +10,9 @@ // results in a change of the ICH for the enum's metadata, and that it stays // the same between rev2 and rev3. -// build-pass (FIXME(62277): could be check-pass?) -// revisions: cfail1 cfail2 cfail3 -// compile-flags: -Z query-dep-graph -O +//@ build-pass (FIXME(62277): could be check-pass?) +//@ revisions: cfail1 cfail2 cfail3 +//@ compile-flags: -Z query-dep-graph -O #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/tests/incremental/hashes/unary_and_binary_exprs.rs b/tests/incremental/hashes/unary_and_binary_exprs.rs index 3d48f2d28a37..d0b502845071 100644 --- a/tests/incremental/hashes/unary_and_binary_exprs.rs +++ b/tests/incremental/hashes/unary_and_binary_exprs.rs @@ -5,12 +5,12 @@ // and make sure that the hash has changed, then change nothing between rev2 and // rev3 and make sure that the hash has not changed. -// build-pass (FIXME(62277): could be check-pass?) -// revisions: cfail1 cfail2 cfail3 cfail4 cfail5 cfail6 -// compile-flags: -Z query-dep-graph -O -// [cfail1]compile-flags: -Zincremental-ignore-spans -// [cfail2]compile-flags: -Zincremental-ignore-spans -// [cfail3]compile-flags: -Zincremental-ignore-spans +//@ build-pass (FIXME(62277): could be check-pass?) +//@ revisions: cfail1 cfail2 cfail3 cfail4 cfail5 cfail6 +//@ compile-flags: -Z query-dep-graph -O +//@ [cfail1]compile-flags: -Zincremental-ignore-spans +//@ [cfail2]compile-flags: -Zincremental-ignore-spans +//@ [cfail3]compile-flags: -Zincremental-ignore-spans #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/tests/incremental/hashes/while_let_loops.rs b/tests/incremental/hashes/while_let_loops.rs index 64ba3f6e7ef8..7a7bcb7d039d 100644 --- a/tests/incremental/hashes/while_let_loops.rs +++ b/tests/incremental/hashes/while_let_loops.rs @@ -5,12 +5,12 @@ // and make sure that the hash has changed, then change nothing between rev2 and // rev3 and make sure that the hash has not changed. -// build-pass (FIXME(62277): could be check-pass?) -// revisions: cfail1 cfail2 cfail3 cfail4 cfail5 cfail6 -// compile-flags: -Z query-dep-graph -O -// [cfail1]compile-flags: -Zincremental-ignore-spans -// [cfail2]compile-flags: -Zincremental-ignore-spans -// [cfail3]compile-flags: -Zincremental-ignore-spans +//@ build-pass (FIXME(62277): could be check-pass?) +//@ revisions: cfail1 cfail2 cfail3 cfail4 cfail5 cfail6 +//@ compile-flags: -Z query-dep-graph -O +//@ [cfail1]compile-flags: -Zincremental-ignore-spans +//@ [cfail2]compile-flags: -Zincremental-ignore-spans +//@ [cfail3]compile-flags: -Zincremental-ignore-spans #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/tests/incremental/hashes/while_loops.rs b/tests/incremental/hashes/while_loops.rs index 534f61b84bde..dc343c3cbfae 100644 --- a/tests/incremental/hashes/while_loops.rs +++ b/tests/incremental/hashes/while_loops.rs @@ -5,12 +5,12 @@ // and make sure that the hash has changed, then change nothing between rev2 and // rev3 and make sure that the hash has not changed. -// build-pass (FIXME(62277): could be check-pass?) -// revisions: cfail1 cfail2 cfail3 cfail4 cfail5 cfail6 -// compile-flags: -Z query-dep-graph -O -// [cfail1]compile-flags: -Zincremental-ignore-spans -// [cfail2]compile-flags: -Zincremental-ignore-spans -// [cfail3]compile-flags: -Zincremental-ignore-spans +//@ build-pass (FIXME(62277): could be check-pass?) +//@ revisions: cfail1 cfail2 cfail3 cfail4 cfail5 cfail6 +//@ compile-flags: -Z query-dep-graph -O +//@ [cfail1]compile-flags: -Zincremental-ignore-spans +//@ [cfail2]compile-flags: -Zincremental-ignore-spans +//@ [cfail3]compile-flags: -Zincremental-ignore-spans #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/tests/incremental/hello_world.rs b/tests/incremental/hello_world.rs index d5ec6e92bc0e..ab1f9dbf1840 100644 --- a/tests/incremental/hello_world.rs +++ b/tests/incremental/hello_world.rs @@ -1,5 +1,5 @@ -// revisions: rpass1 rpass2 -// compile-flags: -Z query-dep-graph +//@ revisions: rpass1 rpass2 +//@ compile-flags: -Z query-dep-graph #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/tests/incremental/hygiene/auxiliary/cached_hygiene.rs b/tests/incremental/hygiene/auxiliary/cached_hygiene.rs index c1fd47cb2bb4..a49715761582 100644 --- a/tests/incremental/hygiene/auxiliary/cached_hygiene.rs +++ b/tests/incremental/hygiene/auxiliary/cached_hygiene.rs @@ -1,5 +1,5 @@ -// revisions:rpass1 rpass2 -// compile-flags: -Z query-dep-graph +//@ revisions:rpass1 rpass2 +//@ compile-flags: -Z query-dep-graph // We use #[inline(always)] to ensure that the downstream crate // will always load the MIR for these functions diff --git a/tests/incremental/hygiene/load_cached_hygiene.rs b/tests/incremental/hygiene/load_cached_hygiene.rs index 355d33458524..4ad9c7d49fda 100644 --- a/tests/incremental/hygiene/load_cached_hygiene.rs +++ b/tests/incremental/hygiene/load_cached_hygiene.rs @@ -1,13 +1,13 @@ -// revisions:rpass1 rpass2 -// compile-flags: -Z query-dep-graph -// aux-build:cached_hygiene.rs +//@ revisions:rpass1 rpass2 +//@ compile-flags: -Z query-dep-graph +//@ aux-build:cached_hygiene.rs // This tests the following scenario // 1. A foreign crate is compiled with incremental compilation. // This causes hygiene information to be saved to the incr cache. // 2. One function is the foreign crate is modified. This causes the // optimized mir for an unmodified function to be loaded from the -// incremental cache and written out to the crate metadata. +//@ incremental cache and written out to the crate metadata. // 3. In the process of loading and writing out this function's MIR, // we load hygiene information from the incremental cache and // write it to our metadata. diff --git a/tests/incremental/ich_method_call_trait_scope.rs b/tests/incremental/ich_method_call_trait_scope.rs index 5566506c039d..a4c6558602f7 100644 --- a/tests/incremental/ich_method_call_trait_scope.rs +++ b/tests/incremental/ich_method_call_trait_scope.rs @@ -1,8 +1,8 @@ // Check that the hash for a method call is sensitive to the traits in // scope. -// revisions: rpass1 rpass2 -// compile-flags: -Z query-dep-graph +//@ revisions: rpass1 rpass2 +//@ compile-flags: -Z query-dep-graph #![feature(rustc_attrs)] diff --git a/tests/incremental/ich_nested_items.rs b/tests/incremental/ich_nested_items.rs index f0310e94015c..19628e0bce1b 100644 --- a/tests/incremental/ich_nested_items.rs +++ b/tests/incremental/ich_nested_items.rs @@ -1,9 +1,9 @@ // Check that the hash of `foo` doesn't change just because we ordered // the nested items (or even added new ones). -// revisions: cfail1 cfail2 -// build-pass (FIXME(62277): could be check-pass?) -// compile-flags: -Z query-dep-graph +//@ revisions: cfail1 cfail2 +//@ build-pass (FIXME(62277): could be check-pass?) +//@ compile-flags: -Z query-dep-graph #![crate_type = "rlib"] #![feature(rustc_attrs)] diff --git a/tests/incremental/ich_resolve_results.rs b/tests/incremental/ich_resolve_results.rs index 9b5afcd80121..c5b2b66fef9f 100644 --- a/tests/incremental/ich_resolve_results.rs +++ b/tests/incremental/ich_resolve_results.rs @@ -1,8 +1,8 @@ // Check that the hash for `mod3::bar` changes when we change the // `use` to something different. -// revisions: rpass1 rpass2 rpass3 -// compile-flags: -Z query-dep-graph +//@ revisions: rpass1 rpass2 rpass3 +//@ compile-flags: -Z query-dep-graph #![feature(rustc_attrs)] diff --git a/tests/incremental/incremental_proc_macro.rs b/tests/incremental/incremental_proc_macro.rs index becc1538fb22..97faf8e698a2 100644 --- a/tests/incremental/incremental_proc_macro.rs +++ b/tests/incremental/incremental_proc_macro.rs @@ -1,6 +1,6 @@ -// aux-build:incremental_proc_macro_aux.rs -// revisions: cfail1 cfail2 -// build-pass (FIXME(62277): could be check-pass?) +//@ aux-build:incremental_proc_macro_aux.rs +//@ revisions: cfail1 cfail2 +//@ build-pass (FIXME(62277): could be check-pass?) // This test makes sure that we still find the proc-macro registrar function // when we compile proc-macros incrementally (see #47292). diff --git a/tests/incremental/inlined_hir_34991/main.rs b/tests/incremental/inlined_hir_34991/main.rs index bb76a0bb8fe8..7754add917d2 100644 --- a/tests/incremental/inlined_hir_34991/main.rs +++ b/tests/incremental/inlined_hir_34991/main.rs @@ -4,7 +4,7 @@ // error because the `X` is remapped to the original def-id (in // libstd), and we can't hash a HIR node from std. -// revisions:rpass1 rpass2 +//@ revisions:rpass1 rpass2 #![feature(rustc_attrs)] diff --git a/tests/incremental/issue-100521-change-struct-name-assocty.rs b/tests/incremental/issue-100521-change-struct-name-assocty.rs index 7f8d1e608819..0c1938beef27 100644 --- a/tests/incremental/issue-100521-change-struct-name-assocty.rs +++ b/tests/incremental/issue-100521-change-struct-name-assocty.rs @@ -1,4 +1,4 @@ -// revisions: rpass1 rpass2 +//@ revisions: rpass1 rpass2 pub fn foo() { bar(); diff --git a/tests/incremental/issue-101518.rs b/tests/incremental/issue-101518.rs index 39373da6a9f6..02f4f5d42e74 100644 --- a/tests/incremental/issue-101518.rs +++ b/tests/incremental/issue-101518.rs @@ -1,4 +1,4 @@ -// revisions: cpass +//@ revisions: cpass #[derive(PartialEq, Eq)] struct Id<'a> { diff --git a/tests/incremental/issue-108481-feed-eval-always.rs b/tests/incremental/issue-108481-feed-eval-always.rs index 8f346a7207e7..ef2e2fb59c2d 100644 --- a/tests/incremental/issue-108481-feed-eval-always.rs +++ b/tests/incremental/issue-108481-feed-eval-always.rs @@ -1,4 +1,4 @@ -// revisions: cpass1 cpass2 +//@ revisions: cpass1 cpass2 #![crate_type = "rlib"] diff --git a/tests/incremental/issue-110457-same-span-closures/auxiliary/egui_inspect_derive.rs b/tests/incremental/issue-110457-same-span-closures/auxiliary/egui_inspect_derive.rs index e7d91235e735..3b4933811d3f 100644 --- a/tests/incremental/issue-110457-same-span-closures/auxiliary/egui_inspect_derive.rs +++ b/tests/incremental/issue-110457-same-span-closures/auxiliary/egui_inspect_derive.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] extern crate proc_macro; diff --git a/tests/incremental/issue-110457-same-span-closures/main.rs b/tests/incremental/issue-110457-same-span-closures/main.rs index b44fda3d36a2..c36b7e3ca804 100644 --- a/tests/incremental/issue-110457-same-span-closures/main.rs +++ b/tests/incremental/issue-110457-same-span-closures/main.rs @@ -1,5 +1,5 @@ -// aux-build: egui_inspect_derive.rs -// revisions: cpass1 cpass2 +//@ aux-build: egui_inspect_derive.rs +//@ revisions: cpass1 cpass2 extern crate egui_inspect_derive; diff --git a/tests/incremental/issue-35593.rs b/tests/incremental/issue-35593.rs index 009e37d17c3b..5e5235dc2c4c 100644 --- a/tests/incremental/issue-35593.rs +++ b/tests/incremental/issue-35593.rs @@ -1,8 +1,8 @@ // Regression test for #35593. Check that we can reuse this trivially // equal example. -// revisions:rpass1 rpass2 -// compile-flags: -Z query-dep-graph +//@ revisions:rpass1 rpass2 +//@ compile-flags: -Z query-dep-graph #![feature(rustc_attrs)] #![rustc_partition_reused(module="issue_35593", cfg="rpass2")] diff --git a/tests/incremental/issue-38222.rs b/tests/incremental/issue-38222.rs index 20d4d4200bc1..e45a16f99b33 100644 --- a/tests/incremental/issue-38222.rs +++ b/tests/incremental/issue-38222.rs @@ -1,8 +1,8 @@ // Test that debuginfo does not introduce a dependency edge to the hir_crate // dep-node. -// revisions:rpass1 rpass2 -// compile-flags: -Z query-dep-graph +//@ revisions:rpass1 rpass2 +//@ compile-flags: -Z query-dep-graph #![feature(rustc_attrs)] #![rustc_partition_reused(module = "issue_38222-mod1", cfg = "rpass2")] @@ -10,8 +10,8 @@ // be re-used, so checking that this module was re-used is sufficient. #![rustc_partition_reused(module = "issue_38222", cfg = "rpass2")] -//[rpass1] compile-flags: -C debuginfo=1 -//[rpass2] compile-flags: -C debuginfo=1 +//@[rpass1] compile-flags: -C debuginfo=1 +//@[rpass2] compile-flags: -C debuginfo=1 pub fn main() { mod1::some_fn(); diff --git a/tests/incremental/issue-39569.rs b/tests/incremental/issue-39569.rs index 881ecfca740b..6fd0776bd733 100644 --- a/tests/incremental/issue-39569.rs +++ b/tests/incremental/issue-39569.rs @@ -3,8 +3,8 @@ // don't end up with an edge to any HIR nodes, but it still gets // preserved in the dep graph. -// revisions:rpass1 rpass2 -// compile-flags: -Z query-dep-graph +//@ revisions:rpass1 rpass2 +//@ compile-flags: -Z query-dep-graph use std::sync::Arc; diff --git a/tests/incremental/issue-39828/auxiliary/generic.rs b/tests/incremental/issue-39828/auxiliary/generic.rs index a5bb0d65f1b0..5400570377d7 100644 --- a/tests/incremental/issue-39828/auxiliary/generic.rs +++ b/tests/incremental/issue-39828/auxiliary/generic.rs @@ -1,5 +1,5 @@ -// revisions:rpass1 rpass2 -// compile-flags: -Z query-dep-graph +//@ revisions:rpass1 rpass2 +//@ compile-flags: -Z query-dep-graph #![rustc_partition_reused(module="generic-fallback.cgu", cfg="rpass2")] #![feature(rustc_attrs)] diff --git a/tests/incremental/issue-39828/issue-39828.rs b/tests/incremental/issue-39828/issue-39828.rs index 8cef916ff542..703d8e8dd228 100644 --- a/tests/incremental/issue-39828/issue-39828.rs +++ b/tests/incremental/issue-39828/issue-39828.rs @@ -5,8 +5,8 @@ // reload, we would consider that node dirty since it is not recreated // (it is not the target of any edges). -// revisions:rpass1 rpass2 -// aux-build:generic.rs +//@ revisions:rpass1 rpass2 +//@ aux-build:generic.rs extern crate generic; fn main() { } diff --git a/tests/incremental/issue-42602.rs b/tests/incremental/issue-42602.rs index b8d5303fb473..d02c7f74665d 100644 --- a/tests/incremental/issue-42602.rs +++ b/tests/incremental/issue-42602.rs @@ -6,9 +6,9 @@ // This was fixed by improving the resolution of the `FnOnce` trait // selection node. -// revisions:cfail1 cfail2 cfail3 -// compile-flags:-Zquery-dep-graph -// build-pass (FIXME(62277): could be check-pass?) +//@ revisions:cfail1 cfail2 cfail3 +//@ compile-flags:-Zquery-dep-graph +//@ build-pass (FIXME(62277): could be check-pass?) #![feature(rustc_attrs)] diff --git a/tests/incremental/issue-49043.rs b/tests/incremental/issue-49043.rs index 8d13718b8d84..e9613683cc5e 100644 --- a/tests/incremental/issue-49043.rs +++ b/tests/incremental/issue-49043.rs @@ -4,7 +4,7 @@ // would then produce a `?0` which -- in turn -- triggered an ICE in // hashing. -// revisions:cfail1 +//@ revisions:cfail1 fn main() { println!("Hello, world! {}",*thread_rng().choose(&[0, 1, 2, 3]).unwrap()); diff --git a/tests/incremental/issue-49482.rs b/tests/incremental/issue-49482.rs index 042ecc0f2795..2dddde6c1710 100644 --- a/tests/incremental/issue-49482.rs +++ b/tests/incremental/issue-49482.rs @@ -1,6 +1,6 @@ -// aux-build:issue-49482-macro-def.rs -// aux-build:issue-49482-reexport.rs -// revisions: rpass1 +//@ aux-build:issue-49482-macro-def.rs +//@ aux-build:issue-49482-reexport.rs +//@ revisions: rpass1 extern crate issue_49482_reexport; diff --git a/tests/incremental/issue-49595/issue-49595.rs b/tests/incremental/issue-49595/issue-49595.rs index 7b1096a64c1d..a291188f746e 100644 --- a/tests/incremental/issue-49595/issue-49595.rs +++ b/tests/incremental/issue-49595/issue-49595.rs @@ -1,6 +1,6 @@ -// revisions:cfail1 cfail2 cfail3 -// compile-flags: -Z query-dep-graph --test -// build-pass +//@ revisions:cfail1 cfail2 cfail3 +//@ compile-flags: -Z query-dep-graph --test +//@ build-pass #![feature(rustc_attrs)] #![crate_type = "rlib"] diff --git a/tests/incremental/issue-51409.rs b/tests/incremental/issue-51409.rs index 280094ec04a2..ed0d8ff49e1f 100644 --- a/tests/incremental/issue-51409.rs +++ b/tests/incremental/issue-51409.rs @@ -1,4 +1,4 @@ -// revisions: rpass1 +//@ revisions: rpass1 // Regression test that `infer_outlives_predicates` can be // used with incremental without an ICE. diff --git a/tests/incremental/issue-54059.rs b/tests/incremental/issue-54059.rs index 0a5a547509f6..a5408c671b76 100644 --- a/tests/incremental/issue-54059.rs +++ b/tests/incremental/issue-54059.rs @@ -1,7 +1,7 @@ -// aux-build:issue-54059.rs -// ignore-wasm32-bare no libc for ffi testing -// ignore-windows - dealing with weird symbols issues on dylibs isn't worth it -// revisions: rpass1 +//@ aux-build:issue-54059.rs +//@ ignore-wasm32-bare no libc for ffi testing +//@ ignore-windows - dealing with weird symbols issues on dylibs isn't worth it +//@ revisions: rpass1 extern crate issue_54059; diff --git a/tests/incremental/issue-54242.rs b/tests/incremental/issue-54242.rs index 806c84152598..9fa5363e0045 100644 --- a/tests/incremental/issue-54242.rs +++ b/tests/incremental/issue-54242.rs @@ -1,4 +1,4 @@ -// revisions: rpass cfail +//@ revisions: rpass cfail trait Tr where diff --git a/tests/incremental/issue-59523-on-implemented-is-not-unused.rs b/tests/incremental/issue-59523-on-implemented-is-not-unused.rs index fa52ca90b105..973757223230 100644 --- a/tests/incremental/issue-59523-on-implemented-is-not-unused.rs +++ b/tests/incremental/issue-59523-on-implemented-is-not-unused.rs @@ -2,8 +2,8 @@ // rustc_on_unimplemented, but with this bug we are seeing it fire (on // subsequent runs) if incremental compilation is enabled. -// revisions: cfail1 cfail2 -// build-pass (FIXME(62277): could be check-pass?) +//@ revisions: cfail1 cfail2 +//@ build-pass (FIXME(62277): could be check-pass?) #![feature(rustc_attrs)] #![deny(unused_attributes)] diff --git a/tests/incremental/issue-59524-layout-scalar-valid-range-is-not-unused.rs b/tests/incremental/issue-59524-layout-scalar-valid-range-is-not-unused.rs index bfb5e539cc18..fcd58f7a8d65 100644 --- a/tests/incremental/issue-59524-layout-scalar-valid-range-is-not-unused.rs +++ b/tests/incremental/issue-59524-layout-scalar-valid-range-is-not-unused.rs @@ -3,8 +3,8 @@ // seeing it fire (on subsequent runs) if incremental compilation is // enabled. -// revisions: cfail1 cfail2 -// build-pass (FIXME(62277): could be check-pass?) +//@ revisions: cfail1 cfail2 +//@ build-pass (FIXME(62277): could be check-pass?) #![feature(rustc_attrs)] #![deny(unused_attributes)] diff --git a/tests/incremental/issue-60629.rs b/tests/incremental/issue-60629.rs index 4807af4b3cf7..117e222fc393 100644 --- a/tests/incremental/issue-60629.rs +++ b/tests/incremental/issue-60629.rs @@ -1,4 +1,4 @@ -// revisions:rpass1 rpass2 +//@ revisions:rpass1 rpass2 struct A; diff --git a/tests/incremental/issue-61323.rs b/tests/incremental/issue-61323.rs index 7ce47947cbb0..b7423c81fc16 100644 --- a/tests/incremental/issue-61323.rs +++ b/tests/incremental/issue-61323.rs @@ -1,4 +1,4 @@ -// revisions: rpass cfail +//@ revisions: rpass cfail enum A { //[cfail]~^ ERROR 3:1: 3:7: recursive types `A` and `C` have infinite size [E0072] diff --git a/tests/incremental/issue-61530.rs b/tests/incremental/issue-61530.rs index 1dcb41ddedae..0197beb48d8c 100644 --- a/tests/incremental/issue-61530.rs +++ b/tests/incremental/issue-61530.rs @@ -1,6 +1,6 @@ #![feature(repr_simd, platform_intrinsics)] -// revisions:rpass1 rpass2 +//@ revisions:rpass1 rpass2 #[repr(simd)] struct I32x2(i32, i32); diff --git a/tests/incremental/issue-62649-path-collisions-happen.rs b/tests/incremental/issue-62649-path-collisions-happen.rs index ee81be76bafe..3b04f0ac9d71 100644 --- a/tests/incremental/issue-62649-path-collisions-happen.rs +++ b/tests/incremental/issue-62649-path-collisions-happen.rs @@ -1,4 +1,4 @@ -// revisions: rpass1 rpass2 +//@ revisions: rpass1 rpass2 #[cfg(rpass1)] pub trait Something { diff --git a/tests/incremental/issue-69596.rs b/tests/incremental/issue-69596.rs index dc587fdc44b0..00d0d2b64a4f 100644 --- a/tests/incremental/issue-69596.rs +++ b/tests/incremental/issue-69596.rs @@ -1,4 +1,4 @@ -// revisions: rpass1 rpass2 +//@ revisions: rpass1 rpass2 #![allow(unused_imports)] diff --git a/tests/incremental/issue-72386.rs b/tests/incremental/issue-72386.rs index 5917152e1bcf..b3cd2a642081 100644 --- a/tests/incremental/issue-72386.rs +++ b/tests/incremental/issue-72386.rs @@ -1,6 +1,6 @@ -// revisions: rpass1 cfail1 rpass3 -// needs-asm-support -// only-x86_64 +//@ revisions: rpass1 cfail1 rpass3 +//@ needs-asm-support +//@ only-x86_64 // Regression test for issue #72386 // Checks that we don't ICE when switching to an invalid register // and back again diff --git a/tests/incremental/issue-79661-missing-def-path-hash.rs b/tests/incremental/issue-79661-missing-def-path-hash.rs index f86fb33fbf68..c063c6a33a28 100644 --- a/tests/incremental/issue-79661-missing-def-path-hash.rs +++ b/tests/incremental/issue-79661-missing-def-path-hash.rs @@ -1,5 +1,5 @@ -// aux-build:issue-79661.rs -// revisions: rpass1 rpass2 rpass3 +//@ aux-build:issue-79661.rs +//@ revisions: rpass1 rpass2 rpass3 // Regression test for issue #79661 // We were failing to copy over a DefPathHash->DefId mapping diff --git a/tests/incremental/issue-79890-imported-crates-changed.rs b/tests/incremental/issue-79890-imported-crates-changed.rs index 93daa5ca9358..8c70d224f9e5 100644 --- a/tests/incremental/issue-79890-imported-crates-changed.rs +++ b/tests/incremental/issue-79890-imported-crates-changed.rs @@ -1,7 +1,7 @@ -// aux-build:issue-79890.rs -// revisions:rpass1 rpass2 rpass3 -// compile-flags:--extern issue_79890 --test -// edition:2018 +//@ aux-build:issue-79890.rs +//@ revisions:rpass1 rpass2 rpass3 +//@ compile-flags:--extern issue_79890 --test +//@ edition:2018 // Tests that we don't ICE when the set of imported crates changes #[cfg(rpass2)] use issue_79890::MyTrait; diff --git a/tests/incremental/issue-80336-invalid-span.rs b/tests/incremental/issue-80336-invalid-span.rs index 7757d915911d..251a59c3b57d 100644 --- a/tests/incremental/issue-80336-invalid-span.rs +++ b/tests/incremental/issue-80336-invalid-span.rs @@ -2,8 +2,8 @@ // Test that we properly handle encoding, decoding, and hashing // of spans with an invalid location and non-root `SyntaxContext` -// revisions:rpass1 rpass2 -// only-x86_64 +//@ revisions:rpass1 rpass2 +//@ only-x86_64 pub fn main() { let _ = is_x86_feature_detected!("avx2"); diff --git a/tests/incremental/issue-80691-bad-eval-cache.rs b/tests/incremental/issue-80691-bad-eval-cache.rs index ad8a338a7964..4f897bd64a0d 100644 --- a/tests/incremental/issue-80691-bad-eval-cache.rs +++ b/tests/incremental/issue-80691-bad-eval-cache.rs @@ -1,7 +1,7 @@ -// revisions: rfail1 rfail2 -// failure-status: 101 -// error-pattern: not implemented -// needs-unwind -Cpanic=abort causes abort instead of exit(101) +//@ revisions: rfail1 rfail2 +//@ failure-status: 101 +//@ error-pattern: not implemented +//@ needs-unwind -Cpanic=abort causes abort instead of exit(101) pub trait Interner { type InternedVariableKinds; diff --git a/tests/incremental/issue-82920-predicate-order-miscompile.rs b/tests/incremental/issue-82920-predicate-order-miscompile.rs index 793af679c9fc..e1c8b1253f62 100644 --- a/tests/incremental/issue-82920-predicate-order-miscompile.rs +++ b/tests/incremental/issue-82920-predicate-order-miscompile.rs @@ -1,4 +1,4 @@ -// revisions: rpass1 rpass2 +//@ revisions: rpass1 rpass2 trait MyTrait: One + Two {} impl One for T { diff --git a/tests/incremental/issue-84252-global-alloc.rs b/tests/incremental/issue-84252-global-alloc.rs index d2438df89ff5..8dc611df9d87 100644 --- a/tests/incremental/issue-84252-global-alloc.rs +++ b/tests/incremental/issue-84252-global-alloc.rs @@ -1,5 +1,5 @@ -// revisions: cfail1 cfail2 -// build-pass +//@ revisions: cfail1 cfail2 +//@ build-pass #![crate_type="lib"] #![crate_type="cdylib"] diff --git a/tests/incremental/issue-85197-invalid-span/auxiliary/invalid-span-helper-lib.rs b/tests/incremental/issue-85197-invalid-span/auxiliary/invalid-span-helper-lib.rs index 2453af5b6b47..f84c4fe9895e 100644 --- a/tests/incremental/issue-85197-invalid-span/auxiliary/invalid-span-helper-lib.rs +++ b/tests/incremental/issue-85197-invalid-span/auxiliary/invalid-span-helper-lib.rs @@ -1,4 +1,4 @@ -// revisions: rpass1 rpass2 +//@ revisions: rpass1 rpass2 extern crate respan; diff --git a/tests/incremental/issue-85197-invalid-span/auxiliary/respan.rs b/tests/incremental/issue-85197-invalid-span/auxiliary/respan.rs index 5088eab62946..c56d9052e32c 100644 --- a/tests/incremental/issue-85197-invalid-span/auxiliary/respan.rs +++ b/tests/incremental/issue-85197-invalid-span/auxiliary/respan.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/incremental/issue-85197-invalid-span/invalid_span_main.rs b/tests/incremental/issue-85197-invalid-span/invalid_span_main.rs index f358460b3382..eaad44780c74 100644 --- a/tests/incremental/issue-85197-invalid-span/invalid_span_main.rs +++ b/tests/incremental/issue-85197-invalid-span/invalid_span_main.rs @@ -1,6 +1,6 @@ -// revisions: rpass1 rpass2 -// aux-build:respan.rs -// aux-build:invalid-span-helper-lib.rs +//@ revisions: rpass1 rpass2 +//@ aux-build:respan.rs +//@ aux-build:invalid-span-helper-lib.rs // This issue has several different parts. The high level idea is: // 1. We create an 'invalid' span with the help of the `respan` proc-macro, diff --git a/tests/incremental/issue-85360-eval-obligation-ice.rs b/tests/incremental/issue-85360-eval-obligation-ice.rs index 1796c9d197c2..6efae1aa12d7 100644 --- a/tests/incremental/issue-85360-eval-obligation-ice.rs +++ b/tests/incremental/issue-85360-eval-obligation-ice.rs @@ -1,7 +1,7 @@ -// revisions:cfail1 cfail2 -//[cfail1] compile-flags: --crate-type=lib --edition=2021 -Zassert-incr-state=not-loaded -//[cfail2] compile-flags: --crate-type=lib --edition=2021 -Zassert-incr-state=loaded -// build-pass +//@ revisions:cfail1 cfail2 +//@[cfail1] compile-flags: --crate-type=lib --edition=2021 -Zassert-incr-state=not-loaded +//@[cfail2] compile-flags: --crate-type=lib --edition=2021 -Zassert-incr-state=loaded +//@ build-pass use core::any::Any; use core::marker::PhantomData; diff --git a/tests/incremental/issue-86753.rs b/tests/incremental/issue-86753.rs index 4d6c4354e2bd..20357b02c8da 100644 --- a/tests/incremental/issue-86753.rs +++ b/tests/incremental/issue-86753.rs @@ -1,5 +1,5 @@ -// edition:2018 -// revisions: rpass1 +//@ edition:2018 +//@ revisions: rpass1 // Regression test for #86753. The `type_implements_trait` query (since moved to a method) diff --git a/tests/incremental/issue-92163-missing-sourcefile/auxiliary/second_crate.rs b/tests/incremental/issue-92163-missing-sourcefile/auxiliary/second_crate.rs index ab7961f38237..d19c3d34b6e0 100644 --- a/tests/incremental/issue-92163-missing-sourcefile/auxiliary/second_crate.rs +++ b/tests/incremental/issue-92163-missing-sourcefile/auxiliary/second_crate.rs @@ -1,4 +1,4 @@ -// compile-flags:--extern first_crate +//@ compile-flags:--extern first_crate // Note: adding `first_crate` to the extern prelude // (instead of using `extern_crate`) appears to be necessary to diff --git a/tests/incremental/issue-92163-missing-sourcefile/issue_92163_main.rs b/tests/incremental/issue-92163-missing-sourcefile/issue_92163_main.rs index e9219c6f5ab2..c5e73f056d70 100644 --- a/tests/incremental/issue-92163-missing-sourcefile/issue_92163_main.rs +++ b/tests/incremental/issue-92163-missing-sourcefile/issue_92163_main.rs @@ -1,6 +1,6 @@ -// aux-build:first_crate.rs -// aux-build:second_crate.rs -// revisions:rpass1 rpass2 +//@ aux-build:first_crate.rs +//@ aux-build:second_crate.rs +//@ revisions:rpass1 rpass2 // Regression test for issue #92163 // Under certain circumstances, we may end up trying to diff --git a/tests/incremental/issue-92987-provisional-dep-node.rs b/tests/incremental/issue-92987-provisional-dep-node.rs index a48a8373c2b5..4daeb69189d5 100644 --- a/tests/incremental/issue-92987-provisional-dep-node.rs +++ b/tests/incremental/issue-92987-provisional-dep-node.rs @@ -1,4 +1,4 @@ -// revisions: rpass1 rpass2 +//@ revisions: rpass1 rpass2 // Regression test for issue #92987 // Tests that we properly manage `DepNode`s during trait evaluation diff --git a/tests/incremental/issue-96319-coinductive-cycle.rs b/tests/incremental/issue-96319-coinductive-cycle.rs index b5ff9112a202..cf98b325271d 100644 --- a/tests/incremental/issue-96319-coinductive-cycle.rs +++ b/tests/incremental/issue-96319-coinductive-cycle.rs @@ -1,5 +1,5 @@ -// edition:2018 -// revisions: rpass1 rpass2 +//@ edition:2018 +//@ revisions: rpass1 rpass2 pub struct Stmt { pub stmt_type: StmtKind, diff --git a/tests/incremental/krate-inherent.rs b/tests/incremental/krate-inherent.rs index 2c04e110525a..0322d112560c 100644 --- a/tests/incremental/krate-inherent.rs +++ b/tests/incremental/krate-inherent.rs @@ -1,6 +1,6 @@ -// revisions: cfail1 cfail2 -// compile-flags: -Z query-dep-graph -// build-pass (FIXME(62277): could be check-pass?) +//@ revisions: cfail1 cfail2 +//@ compile-flags: -Z query-dep-graph +//@ build-pass (FIXME(62277): could be check-pass?) #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/tests/incremental/krate-inlined.rs b/tests/incremental/krate-inlined.rs index 6b1db74a37c6..3d96b0570f15 100644 --- a/tests/incremental/krate-inlined.rs +++ b/tests/incremental/krate-inlined.rs @@ -2,8 +2,8 @@ // a dependency from the local hir_crate node. We can't easily test that // directly anymore, so now we test that we get reuse. -// revisions: rpass1 rpass2 -// compile-flags: -Z query-dep-graph +//@ revisions: rpass1 rpass2 +//@ compile-flags: -Z query-dep-graph #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/tests/incremental/krate_reassign_34991/main.rs b/tests/incremental/krate_reassign_34991/main.rs index c4ae19ac942f..50f418a3fddb 100644 --- a/tests/incremental/krate_reassign_34991/main.rs +++ b/tests/incremental/krate_reassign_34991/main.rs @@ -1,5 +1,5 @@ -// aux-build:a.rs -// revisions:rpass1 rpass2 +//@ aux-build:a.rs +//@ revisions:rpass1 rpass2 #![feature(rustc_attrs)] diff --git a/tests/incremental/link_order/auxiliary/my_lib.rs b/tests/incremental/link_order/auxiliary/my_lib.rs index 1e7d823050c3..8c083a6701da 100644 --- a/tests/incremental/link_order/auxiliary/my_lib.rs +++ b/tests/incremental/link_order/auxiliary/my_lib.rs @@ -1,3 +1,3 @@ -// no-prefer-dynamic -//[cfail1] compile-flags: -lbar -lfoo --crate-type lib -Zassert-incr-state=not-loaded -//[cfail2] compile-flags: -lfoo -lbar --crate-type lib -Zassert-incr-state=not-loaded +//@ no-prefer-dynamic +//@[cfail1] compile-flags: -lbar -lfoo --crate-type lib -Zassert-incr-state=not-loaded +//@[cfail2] compile-flags: -lfoo -lbar --crate-type lib -Zassert-incr-state=not-loaded diff --git a/tests/incremental/link_order/main.rs b/tests/incremental/link_order/main.rs index d211c295bc49..847a47a75598 100644 --- a/tests/incremental/link_order/main.rs +++ b/tests/incremental/link_order/main.rs @@ -1,7 +1,7 @@ -// aux-build:my_lib.rs -// error-pattern: error: linking with -// revisions:cfail1 cfail2 -// compile-flags:-Z query-dep-graph +//@ aux-build:my_lib.rs +//@ error-pattern: error: linking with +//@ revisions:cfail1 cfail2 +//@ compile-flags:-Z query-dep-graph // Tests that re-ordering the `-l` arguments used // when compiling an external dependency does not lead to diff --git a/tests/incremental/lto-in-linker.rs b/tests/incremental/lto-in-linker.rs index 0e8c1ebb9198..b5009d683486 100644 --- a/tests/incremental/lto-in-linker.rs +++ b/tests/incremental/lto-in-linker.rs @@ -1,7 +1,7 @@ -// revisions:cfail1 cfail2 -// compile-flags: -Z query-dep-graph --crate-type rlib -C linker-plugin-lto -O -// no-prefer-dynamic -// build-pass +//@ revisions:cfail1 cfail2 +//@ compile-flags: -Z query-dep-graph --crate-type rlib -C linker-plugin-lto -O +//@ no-prefer-dynamic +//@ build-pass #![feature(rustc_attrs)] #![rustc_partition_reused(module = "lto_in_linker", cfg = "cfail2")] diff --git a/tests/incremental/lto.rs b/tests/incremental/lto.rs index 2a3e3c2467cd..044267a9cfdf 100644 --- a/tests/incremental/lto.rs +++ b/tests/incremental/lto.rs @@ -1,6 +1,6 @@ -// no-prefer-dynamic -// revisions:rpass1 rpass2 -// compile-flags: -C lto +//@ no-prefer-dynamic +//@ revisions:rpass1 rpass2 +//@ compile-flags: -C lto mod x { pub struct X { diff --git a/tests/incremental/macro_export.rs b/tests/incremental/macro_export.rs index 044d63fd2a9f..23e8f01cf330 100644 --- a/tests/incremental/macro_export.rs +++ b/tests/incremental/macro_export.rs @@ -1,5 +1,5 @@ -// revisions: cfail1 cfail2 cfail3 -// build-pass (FIXME(62277): could be check-pass?) +//@ revisions: cfail1 cfail2 cfail3 +//@ build-pass (FIXME(62277): could be check-pass?) // This test case makes sure that we can compile with incremental compilation // enabled when there are macros exported from this crate. (See #37756) diff --git a/tests/incremental/mir-opt.rs b/tests/incremental/mir-opt.rs index 5bd863439df5..04b82d9ea7fd 100644 --- a/tests/incremental/mir-opt.rs +++ b/tests/incremental/mir-opt.rs @@ -1,8 +1,8 @@ // MIR optimizations can create expansions after the TyCtxt has been created. // This test verifies that those expansions can be decoded correctly. -// revisions:rpass1 rpass2 -// compile-flags: -Z query-dep-graph -Z mir-opt-level=3 +//@ revisions:rpass1 rpass2 +//@ compile-flags: -Z query-dep-graph -Z mir-opt-level=3 fn main() { if std::env::var("a").is_ok() { diff --git a/tests/incremental/no_mangle.rs b/tests/incremental/no_mangle.rs index b1c9b2bc37f6..1a01a40113a2 100644 --- a/tests/incremental/no_mangle.rs +++ b/tests/incremental/no_mangle.rs @@ -1,6 +1,6 @@ -// revisions:cfail1 cfail2 -// check-pass -// compile-flags: --crate-type cdylib +//@ revisions:cfail1 cfail2 +//@ check-pass +//@ compile-flags: --crate-type cdylib #![deny(unused_attributes)] diff --git a/tests/incremental/remapped_paths_cc/auxiliary/extern_crate.rs b/tests/incremental/remapped_paths_cc/auxiliary/extern_crate.rs index 627b99445ea8..166000f3214b 100644 --- a/tests/incremental/remapped_paths_cc/auxiliary/extern_crate.rs +++ b/tests/incremental/remapped_paths_cc/auxiliary/extern_crate.rs @@ -1,6 +1,6 @@ -//[rpass1] compile-flags: -g -//[rpass2] compile-flags: -g -//[rpass3] compile-flags: -g --remap-path-prefix={{src-base}}=/the/src +//@[rpass1] compile-flags: -g +//@[rpass2] compile-flags: -g +//@[rpass3] compile-flags: -g --remap-path-prefix={{src-base}}=/the/src #![feature(rustc_attrs)] #![crate_type="rlib"] diff --git a/tests/incremental/remapped_paths_cc/main.rs b/tests/incremental/remapped_paths_cc/main.rs index 12411a928799..35e03d754469 100644 --- a/tests/incremental/remapped_paths_cc/main.rs +++ b/tests/incremental/remapped_paths_cc/main.rs @@ -1,6 +1,6 @@ -// revisions:rpass1 rpass2 rpass3 -// compile-flags: -Z query-dep-graph -g -// aux-build:extern_crate.rs +//@ revisions:rpass1 rpass2 rpass3 +//@ compile-flags: -Z query-dep-graph -g +//@ aux-build:extern_crate.rs // This test case makes sure that we detect if paths emitted into debuginfo // are changed, even when the change happens in an external crate. diff --git a/tests/incremental/remove-private-item-cross-crate/main.rs b/tests/incremental/remove-private-item-cross-crate/main.rs index c831ab6fec12..209b061dfb66 100644 --- a/tests/incremental/remove-private-item-cross-crate/main.rs +++ b/tests/incremental/remove-private-item-cross-crate/main.rs @@ -1,9 +1,9 @@ // Test that we are able to reuse `main` even though a private // item was removed from the root module of crate`a`. -// revisions:rpass1 rpass2 -// aux-build:a.rs -// compile-flags: -Zquery-dep-graph +//@ revisions:rpass1 rpass2 +//@ aux-build:a.rs +//@ compile-flags: -Zquery-dep-graph #![feature(rustc_attrs)] #![crate_type = "bin"] diff --git a/tests/incremental/remove_crate/main.rs b/tests/incremental/remove_crate/main.rs index 14b80df0d389..e3f15bd9c8cd 100644 --- a/tests/incremental/remove_crate/main.rs +++ b/tests/incremental/remove_crate/main.rs @@ -1,7 +1,7 @@ // Test that removing an upstream crate does not cause any trouble. -// revisions:rpass1 rpass2 -// aux-build:extern_crate.rs +//@ revisions:rpass1 rpass2 +//@ aux-build:extern_crate.rs #[cfg(rpass1)] extern crate extern_crate; diff --git a/tests/incremental/remove_source_file/main.rs b/tests/incremental/remove_source_file/main.rs index b2411c0946fd..979d768e0be2 100644 --- a/tests/incremental/remove_source_file/main.rs +++ b/tests/incremental/remove_source_file/main.rs @@ -1,12 +1,12 @@ // This test case makes sure that the compiler doesn't crash due to a failing // table lookup when a source file is removed. -// revisions:cfail1 cfail2 +//@ revisions:cfail1 cfail2 // Note that we specify -g so that the SourceFiles actually get referenced by the // incr. comp. cache: -// compile-flags: -Z query-dep-graph -g -// build-pass (FIXME(62277): could be check-pass?) +//@ compile-flags: -Z query-dep-graph -g +//@ build-pass (FIXME(62277): could be check-pass?) #![crate_type= "rlib"] diff --git a/tests/incremental/reorder_vtable.rs b/tests/incremental/reorder_vtable.rs index 8dacba63351e..89ff14e8feee 100644 --- a/tests/incremental/reorder_vtable.rs +++ b/tests/incremental/reorder_vtable.rs @@ -1,4 +1,4 @@ -// revisions:rpass1 rpass2 +//@ revisions:rpass1 rpass2 // This test case makes sure re-order the methods in a vtable will // trigger recompilation of codegen units that instantiate it. diff --git a/tests/incremental/rlib-lto.rs b/tests/incremental/rlib-lto.rs index 752fee5a0d5b..51090615b1fa 100644 --- a/tests/incremental/rlib-lto.rs +++ b/tests/incremental/rlib-lto.rs @@ -1,6 +1,6 @@ -// revisions:cfail1 cfail2 -// compile-flags: -Z query-dep-graph --crate-type rlib -C lto -// build-pass +//@ revisions:cfail1 cfail2 +//@ compile-flags: -Z query-dep-graph --crate-type rlib -C lto +//@ build-pass #![feature(rustc_attrs)] #![rustc_partition_reused(module = "rlib_lto", cfg = "cfail2")] diff --git a/tests/incremental/rlib_cross_crate/auxiliary/a.rs b/tests/incremental/rlib_cross_crate/auxiliary/a.rs index 5a26df9ae50c..d2403ebbfdb4 100644 --- a/tests/incremental/rlib_cross_crate/auxiliary/a.rs +++ b/tests/incremental/rlib_cross_crate/auxiliary/a.rs @@ -1,5 +1,5 @@ -// no-prefer-dynamic -// compile-flags: -Z query-dep-graph +//@ no-prefer-dynamic +//@ compile-flags: -Z query-dep-graph #![crate_type="rlib"] diff --git a/tests/incremental/rlib_cross_crate/b.rs b/tests/incremental/rlib_cross_crate/b.rs index 639cfc918cb4..672d2ba40684 100644 --- a/tests/incremental/rlib_cross_crate/b.rs +++ b/tests/incremental/rlib_cross_crate/b.rs @@ -3,10 +3,10 @@ // build rlibs (before we were only testing dylibs, which meant we // didn't realize we had to preserve a `bc` file as well). -// aux-build:a.rs -// revisions:rpass1 rpass2 rpass3 -// no-prefer-dynamic -// compile-flags: -Z query-dep-graph +//@ aux-build:a.rs +//@ revisions:rpass1 rpass2 rpass3 +//@ no-prefer-dynamic +//@ compile-flags: -Z query-dep-graph #![feature(rustc_attrs)] diff --git a/tests/incremental/rustc-rust-log.rs b/tests/incremental/rustc-rust-log.rs index 566f0d96d973..602d376bae5f 100644 --- a/tests/incremental/rustc-rust-log.rs +++ b/tests/incremental/rustc-rust-log.rs @@ -1,11 +1,11 @@ -// revisions: rpass1 rpass2 +//@ revisions: rpass1 rpass2 // This test is just checking that we won't ICE if logging is turned // on; don't bother trying to compare that (copious) output. // -// dont-check-compiler-stdout -// dont-check-compiler-stderr -// aux-build: rustc-rust-log-aux.rs -// rustc-env:RUSTC_LOG=debug +//@ dont-check-compiler-stdout +//@ dont-check-compiler-stderr +//@ aux-build: rustc-rust-log-aux.rs +//@ rustc-env:RUSTC_LOG=debug #[cfg(rpass1)] fn main() {} diff --git a/tests/incremental/source_loc_macros.rs b/tests/incremental/source_loc_macros.rs index 16ad4d1899e9..dbe0a4ba9046 100644 --- a/tests/incremental/source_loc_macros.rs +++ b/tests/incremental/source_loc_macros.rs @@ -1,9 +1,9 @@ // This test makes sure that different expansions of the file!(), line!(), // column!() macros get picked up by the incr. comp. hash. -// revisions:rpass1 rpass2 +//@ revisions:rpass1 rpass2 -// compile-flags: -Z query-dep-graph +//@ compile-flags: -Z query-dep-graph #![feature(rustc_attrs)] diff --git a/tests/incremental/span_hash_stable/main.rs b/tests/incremental/span_hash_stable/main.rs index f1d7de145593..0dba650163d3 100644 --- a/tests/incremental/span_hash_stable/main.rs +++ b/tests/incremental/span_hash_stable/main.rs @@ -3,8 +3,8 @@ // the spans and this test makes sure that we handle them correctly by hashing // file:line:column instead of raw byte offset. -// revisions:rpass1 rpass2 -// compile-flags: -g -Z query-dep-graph +//@ revisions:rpass1 rpass2 +//@ compile-flags: -g -Z query-dep-graph #![feature(rustc_attrs)] diff --git a/tests/incremental/spans_in_type_debuginfo.rs b/tests/incremental/spans_in_type_debuginfo.rs index 8ed469db6e63..e8ae592c0c74 100644 --- a/tests/incremental/spans_in_type_debuginfo.rs +++ b/tests/incremental/spans_in_type_debuginfo.rs @@ -1,8 +1,8 @@ // Test that moving a type definition within a source file does not affect // re-compilation. -// revisions:rpass1 rpass2 -// compile-flags: -Z query-dep-graph -g +//@ revisions:rpass1 rpass2 +//@ compile-flags: -Z query-dep-graph -g #![rustc_partition_reused(module="spans_in_type_debuginfo-structs", cfg="rpass2")] #![rustc_partition_reused(module="spans_in_type_debuginfo-enums", cfg="rpass2")] diff --git a/tests/incremental/spans_significant_w_debuginfo.rs b/tests/incremental/spans_significant_w_debuginfo.rs index a036d3e69fe4..48be9cd3bc96 100644 --- a/tests/incremental/spans_significant_w_debuginfo.rs +++ b/tests/incremental/spans_significant_w_debuginfo.rs @@ -1,9 +1,9 @@ // This test makes sure that just changing a definition's location in the // source file also changes its incr. comp. hash, if debuginfo is enabled. -// revisions:rpass1 rpass2 +//@ revisions:rpass1 rpass2 -// compile-flags: -g -Z query-dep-graph +//@ compile-flags: -g -Z query-dep-graph #![feature(rustc_attrs)] #![rustc_partition_codegened(module = "spans_significant_w_debuginfo", cfg = "rpass2")] diff --git a/tests/incremental/spans_significant_w_panic.rs b/tests/incremental/spans_significant_w_panic.rs index 085e4cd78ca1..f9016725258b 100644 --- a/tests/incremental/spans_significant_w_panic.rs +++ b/tests/incremental/spans_significant_w_panic.rs @@ -1,9 +1,9 @@ // This test makes sure that just changing a definition's location in the // source file also changes its incr. comp. hash, if debuginfo is enabled. -// revisions:rpass1 rpass2 +//@ revisions:rpass1 rpass2 -// compile-flags: -C overflow-checks=on -Z query-dep-graph +//@ compile-flags: -C overflow-checks=on -Z query-dep-graph #![feature(rustc_attrs)] #![rustc_partition_codegened(module = "spans_significant_w_panic", cfg = "rpass2")] diff --git a/tests/incremental/spike-neg1.rs b/tests/incremental/spike-neg1.rs index 97812ffe3be9..c5fe31862b47 100644 --- a/tests/incremental/spike-neg1.rs +++ b/tests/incremental/spike-neg1.rs @@ -2,11 +2,11 @@ // `rustc_partition_reused` and `rustc_partition_codegened` tests. // Here we change and say that the `x` module will be reused (when in // fact it will not), and then indicate that the test itself -// should-fail (because an error will be reported, and hence the +//@ should-fail (because an error will be reported, and hence the // revision rpass2 will not compile, despite being named rpass). -// revisions:rpass1 rpass2 -// should-fail +//@ revisions:rpass1 rpass2 +//@ should-fail #![feature(rustc_attrs)] diff --git a/tests/incremental/spike-neg2.rs b/tests/incremental/spike-neg2.rs index 3bb1914fd6a4..140aa4684a77 100644 --- a/tests/incremental/spike-neg2.rs +++ b/tests/incremental/spike-neg2.rs @@ -2,11 +2,11 @@ // `rustc_partition_reused` and `rustc_partition_codegened` tests. // Here we change and say that the `y` module will be codegened (when // in fact it will not), and then indicate that the test itself -// should-fail (because an error will be reported, and hence the +//@ should-fail (because an error will be reported, and hence the // revision rpass2 will not compile, despite being named rpass). -// revisions:rpass1 rpass2 -// should-fail +//@ revisions:rpass1 rpass2 +//@ should-fail #![feature(rustc_attrs)] diff --git a/tests/incremental/spike.rs b/tests/incremental/spike.rs index a6a05e7c3db8..5e6cd2fe3b39 100644 --- a/tests/incremental/spike.rs +++ b/tests/incremental/spike.rs @@ -2,8 +2,8 @@ // content of the `make` function, and we find that we can reuse the // `y` module entirely (but not the `x` module). -// revisions:rpass1 rpass2 -// compile-flags: -Z query-dep-graph +//@ revisions:rpass1 rpass2 +//@ compile-flags: -Z query-dep-graph #![feature(rustc_attrs)] diff --git a/tests/incremental/split_debuginfo_cached.rs b/tests/incremental/split_debuginfo_cached.rs index ba8385f89a72..4dea77308a71 100644 --- a/tests/incremental/split_debuginfo_cached.rs +++ b/tests/incremental/split_debuginfo_cached.rs @@ -3,11 +3,11 @@ // pack into a DWARF package. // ignore-tidy-linelength -// only-x86_64-unknown-linux-gnu -// revisions:rpass1 rpass2 +//@ only-x86_64-unknown-linux-gnu +//@ revisions:rpass1 rpass2 -// [rpass1]compile-flags: -g -Zquery-dep-graph -Csplit-debuginfo=packed -Zsplit-dwarf-kind=split -// [rpass2]compile-flags: -g -Zquery-dep-graph -Csplit-debuginfo=packed -Zsplit-dwarf-kind=split +//@ [rpass1]compile-flags: -g -Zquery-dep-graph -Csplit-debuginfo=packed -Zsplit-dwarf-kind=split +//@ [rpass2]compile-flags: -g -Zquery-dep-graph -Csplit-debuginfo=packed -Zsplit-dwarf-kind=split #![feature(rustc_attrs)] // For `rpass2`, nothing has changed so everything should re-used. diff --git a/tests/incremental/split_debuginfo_mode.rs b/tests/incremental/split_debuginfo_mode.rs index edc1a80d30e0..d994e24cd587 100644 --- a/tests/incremental/split_debuginfo_mode.rs +++ b/tests/incremental/split_debuginfo_mode.rs @@ -3,13 +3,13 @@ // and the test is platform-independent otherwise. // ignore-tidy-linelength -// only-x86_64-unknown-linux-gnu -// revisions:rpass1 rpass2 rpass3 rpass4 +//@ only-x86_64-unknown-linux-gnu +//@ revisions:rpass1 rpass2 rpass3 rpass4 -// [rpass1]compile-flags: -Zquery-dep-graph -Csplit-debuginfo=unpacked -Zsplit-dwarf-kind=single -Zsplit-dwarf-inlining=on -// [rpass2]compile-flags: -Zquery-dep-graph -Csplit-debuginfo=packed -Zsplit-dwarf-kind=single -Zsplit-dwarf-inlining=on -// [rpass3]compile-flags: -Zquery-dep-graph -Csplit-debuginfo=packed -Zsplit-dwarf-kind=split -Zsplit-dwarf-inlining=on -// [rpass4]compile-flags: -Zquery-dep-graph -Csplit-debuginfo=packed -Zsplit-dwarf-kind=split -Zsplit-dwarf-inlining=off +//@ [rpass1]compile-flags: -Zquery-dep-graph -Csplit-debuginfo=unpacked -Zsplit-dwarf-kind=single -Zsplit-dwarf-inlining=on +//@ [rpass2]compile-flags: -Zquery-dep-graph -Csplit-debuginfo=packed -Zsplit-dwarf-kind=single -Zsplit-dwarf-inlining=on +//@ [rpass3]compile-flags: -Zquery-dep-graph -Csplit-debuginfo=packed -Zsplit-dwarf-kind=split -Zsplit-dwarf-inlining=on +//@ [rpass4]compile-flags: -Zquery-dep-graph -Csplit-debuginfo=packed -Zsplit-dwarf-kind=split -Zsplit-dwarf-inlining=off #![feature(rustc_attrs)] // For rpass2 we change -Csplit-debuginfo and thus expect every CGU to be recompiled diff --git a/tests/incremental/static_cycle/b.rs b/tests/incremental/static_cycle/b.rs index 064213fbabbf..7054b2ea4e36 100644 --- a/tests/incremental/static_cycle/b.rs +++ b/tests/incremental/static_cycle/b.rs @@ -1,4 +1,4 @@ -// revisions:rpass1 rpass2 +//@ revisions:rpass1 rpass2 #![cfg_attr(rpass2, warn(dead_code))] diff --git a/tests/incremental/static_refering_to_other_static/issue-49081.rs b/tests/incremental/static_refering_to_other_static/issue-49081.rs index 8e3715d1d834..b6c1c1a9c8bd 100644 --- a/tests/incremental/static_refering_to_other_static/issue-49081.rs +++ b/tests/incremental/static_refering_to_other_static/issue-49081.rs @@ -1,6 +1,6 @@ // https://github.com/rust-lang/rust/issues/49081 -// revisions:rpass1 rpass2 +//@ revisions:rpass1 rpass2 pub static A: i32 = 42; pub static B: &i32 = &A; diff --git a/tests/incremental/static_refering_to_other_static2/issue.rs b/tests/incremental/static_refering_to_other_static2/issue.rs index 720bb1e222b4..8b6dc6d3e4b0 100644 --- a/tests/incremental/static_refering_to_other_static2/issue.rs +++ b/tests/incremental/static_refering_to_other_static2/issue.rs @@ -1,4 +1,4 @@ -// revisions:rpass1 rpass2 +//@ revisions:rpass1 rpass2 #[cfg(rpass1)] pub static A: i32 = 42; diff --git a/tests/incremental/static_refering_to_other_static3/issue.rs b/tests/incremental/static_refering_to_other_static3/issue.rs index 80999813dc5b..39e46745f8a2 100644 --- a/tests/incremental/static_refering_to_other_static3/issue.rs +++ b/tests/incremental/static_refering_to_other_static3/issue.rs @@ -1,4 +1,4 @@ -// revisions:rpass1 rpass2 +//@ revisions:rpass1 rpass2 #[cfg(rpass1)] pub static A: u8 = 42; diff --git a/tests/incremental/static_stable_hash/issue-49301.rs b/tests/incremental/static_stable_hash/issue-49301.rs index fdd05c72ca3c..68dc6d214c4e 100644 --- a/tests/incremental/static_stable_hash/issue-49301.rs +++ b/tests/incremental/static_stable_hash/issue-49301.rs @@ -1,6 +1,6 @@ // https://github.com/rust-lang/rust/issues/49081 -// revisions:rpass1 rpass2 +//@ revisions:rpass1 rpass2 #[cfg(rpass1)] pub static A: &str = "hello"; diff --git a/tests/incremental/string_constant.rs b/tests/incremental/string_constant.rs index 325b200e69b4..901e2f0c59b0 100644 --- a/tests/incremental/string_constant.rs +++ b/tests/incremental/string_constant.rs @@ -1,6 +1,6 @@ -// revisions: cfail1 cfail2 -// compile-flags: -Z query-dep-graph -Copt-level=0 -// build-pass (FIXME(62277): could be check-pass?) +//@ revisions: cfail1 cfail2 +//@ compile-flags: -Z query-dep-graph -Copt-level=0 +//@ build-pass (FIXME(62277): could be check-pass?) #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/tests/incremental/struct_add_field.rs b/tests/incremental/struct_add_field.rs index 720854f16052..ad1b6fcfe282 100644 --- a/tests/incremental/struct_add_field.rs +++ b/tests/incremental/struct_add_field.rs @@ -1,8 +1,8 @@ // Test incremental compilation tracking where we change field names // in between revisions (hashing should be stable). -// revisions:rpass1 rpass2 -// compile-flags: -Z query-dep-graph +//@ revisions:rpass1 rpass2 +//@ compile-flags: -Z query-dep-graph #![feature(rustc_attrs)] diff --git a/tests/incremental/struct_change_field_name.rs b/tests/incremental/struct_change_field_name.rs index bd952bcc1c89..1519f8d477e5 100644 --- a/tests/incremental/struct_change_field_name.rs +++ b/tests/incremental/struct_change_field_name.rs @@ -1,9 +1,9 @@ // Test incremental compilation tracking where we change field names // in between revisions (hashing should be stable). -// revisions:rpass1 cfail2 -// compile-flags: -Z query-dep-graph -// [cfail2] compile-flags: -Z query-dep-graph -Z assert-incr-state=loaded +//@ revisions:rpass1 cfail2 +//@ compile-flags: -Z query-dep-graph +//@ [cfail2] compile-flags: -Z query-dep-graph -Z assert-incr-state=loaded #![feature(rustc_attrs)] #![allow(unused_variables)] diff --git a/tests/incremental/struct_change_field_type.rs b/tests/incremental/struct_change_field_type.rs index 37d2fba9901a..aed6c8884ac4 100644 --- a/tests/incremental/struct_change_field_type.rs +++ b/tests/incremental/struct_change_field_type.rs @@ -1,8 +1,8 @@ // Test incremental compilation tracking where we change nothing // in between revisions (hashing should be stable). -// revisions:rpass1 rpass2 -// compile-flags: -Z query-dep-graph +//@ revisions:rpass1 rpass2 +//@ compile-flags: -Z query-dep-graph #![feature(rustc_attrs)] diff --git a/tests/incremental/struct_change_field_type_cross_crate/b.rs b/tests/incremental/struct_change_field_type_cross_crate/b.rs index c78207bcb1a1..00bc3db0de86 100644 --- a/tests/incremental/struct_change_field_type_cross_crate/b.rs +++ b/tests/incremental/struct_change_field_type_cross_crate/b.rs @@ -1,6 +1,6 @@ -// aux-build:a.rs -// revisions:rpass1 rpass2 -// compile-flags: -Z query-dep-graph +//@ aux-build:a.rs +//@ revisions:rpass1 rpass2 +//@ compile-flags: -Z query-dep-graph #![feature(rustc_attrs)] diff --git a/tests/incremental/struct_change_nothing.rs b/tests/incremental/struct_change_nothing.rs index de30c818cfe0..3fc9a1c4de7f 100644 --- a/tests/incremental/struct_change_nothing.rs +++ b/tests/incremental/struct_change_nothing.rs @@ -1,8 +1,8 @@ // Test incremental compilation tracking where we change nothing // in between revisions (hashing should be stable). -// revisions:rpass1 rpass2 -// compile-flags: -Z query-dep-graph +//@ revisions:rpass1 rpass2 +//@ compile-flags: -Z query-dep-graph #![feature(rustc_attrs)] diff --git a/tests/incremental/struct_remove_field.rs b/tests/incremental/struct_remove_field.rs index b97a87e09629..488d7996b339 100644 --- a/tests/incremental/struct_remove_field.rs +++ b/tests/incremental/struct_remove_field.rs @@ -1,8 +1,8 @@ // Test incremental compilation tracking where we change field names // in between revisions (hashing should be stable). -// revisions:rpass1 rpass2 -// compile-flags: -Z query-dep-graph +//@ revisions:rpass1 rpass2 +//@ compile-flags: -Z query-dep-graph #![feature(rustc_attrs)] diff --git a/tests/incremental/thinlto/cgu_invalidated_via_import.rs b/tests/incremental/thinlto/cgu_invalidated_via_import.rs index a81b4f7e9d0d..04a5a06384a3 100644 --- a/tests/incremental/thinlto/cgu_invalidated_via_import.rs +++ b/tests/incremental/thinlto/cgu_invalidated_via_import.rs @@ -2,9 +2,9 @@ // via ThinLTO and that imported thing changes while the definition of the CGU // stays untouched. -// revisions: cfail1 cfail2 cfail3 -// compile-flags: -Z query-dep-graph -O -// build-pass +//@ revisions: cfail1 cfail2 cfail3 +//@ compile-flags: -Z query-dep-graph -O +//@ build-pass #![feature(rustc_attrs)] #![crate_type="rlib"] diff --git a/tests/incremental/thinlto/cgu_invalidated_when_export_added.rs b/tests/incremental/thinlto/cgu_invalidated_when_export_added.rs index 95f3b8ae4d98..a9b05467bf68 100644 --- a/tests/incremental/thinlto/cgu_invalidated_when_export_added.rs +++ b/tests/incremental/thinlto/cgu_invalidated_when_export_added.rs @@ -1,5 +1,5 @@ -// revisions: cfail1 cfail2 -// build-pass +//@ revisions: cfail1 cfail2 +//@ build-pass // rust-lang/rust#69798: // diff --git a/tests/incremental/thinlto/cgu_invalidated_when_export_removed.rs b/tests/incremental/thinlto/cgu_invalidated_when_export_removed.rs index e86ebd354b1a..3a78a290c7b2 100644 --- a/tests/incremental/thinlto/cgu_invalidated_when_export_removed.rs +++ b/tests/incremental/thinlto/cgu_invalidated_when_export_removed.rs @@ -1,5 +1,5 @@ -// revisions: cfail1 cfail2 -// build-pass +//@ revisions: cfail1 cfail2 +//@ build-pass // rust-lang/rust#69798: // diff --git a/tests/incremental/thinlto/cgu_invalidated_when_import_added.rs b/tests/incremental/thinlto/cgu_invalidated_when_import_added.rs index 9c17c8745f8c..4198c6c273ba 100644 --- a/tests/incremental/thinlto/cgu_invalidated_when_import_added.rs +++ b/tests/incremental/thinlto/cgu_invalidated_when_import_added.rs @@ -1,6 +1,6 @@ -// revisions: cfail1 cfail2 -// compile-flags: -O -Zhuman-readable-cgu-names -Cllvm-args=-import-instr-limit=10 -// build-pass +//@ revisions: cfail1 cfail2 +//@ compile-flags: -O -Zhuman-readable-cgu-names -Cllvm-args=-import-instr-limit=10 +//@ build-pass // rust-lang/rust#59535: // diff --git a/tests/incremental/thinlto/cgu_invalidated_when_import_removed.rs b/tests/incremental/thinlto/cgu_invalidated_when_import_removed.rs index fc53acf75cb8..4880d376fcc0 100644 --- a/tests/incremental/thinlto/cgu_invalidated_when_import_removed.rs +++ b/tests/incremental/thinlto/cgu_invalidated_when_import_removed.rs @@ -1,6 +1,6 @@ -// revisions: cfail1 cfail2 -// compile-flags: -O -Zhuman-readable-cgu-names -Cllvm-args=-import-instr-limit=10 -// build-pass +//@ revisions: cfail1 cfail2 +//@ compile-flags: -O -Zhuman-readable-cgu-names -Cllvm-args=-import-instr-limit=10 +//@ build-pass // rust-lang/rust#59535: // diff --git a/tests/incremental/thinlto/cgu_keeps_identical_fn.rs b/tests/incremental/thinlto/cgu_keeps_identical_fn.rs index 9e840f67ab27..5751759223b9 100644 --- a/tests/incremental/thinlto/cgu_keeps_identical_fn.rs +++ b/tests/incremental/thinlto/cgu_keeps_identical_fn.rs @@ -3,9 +3,9 @@ // ends up with any spans in its LLVM bitecode, so LLVM is able to skip // re-building any modules which import 'inlined_fn' -// revisions: cfail1 cfail2 cfail3 -// compile-flags: -Z query-dep-graph -O -// build-pass +//@ revisions: cfail1 cfail2 cfail3 +//@ compile-flags: -Z query-dep-graph -O +//@ build-pass #![feature(rustc_attrs)] #![crate_type = "rlib"] diff --git a/tests/incremental/thinlto/independent_cgus_dont_affect_each_other.rs b/tests/incremental/thinlto/independent_cgus_dont_affect_each_other.rs index 45eb13828743..e05508fa8e30 100644 --- a/tests/incremental/thinlto/independent_cgus_dont_affect_each_other.rs +++ b/tests/incremental/thinlto/independent_cgus_dont_affect_each_other.rs @@ -1,9 +1,9 @@ // This test checks that a change in a CGU does not invalidate an unrelated CGU // during incremental ThinLTO. -// revisions: cfail1 cfail2 cfail3 -// compile-flags: -Z query-dep-graph -O -// build-pass +//@ revisions: cfail1 cfail2 cfail3 +//@ compile-flags: -Z query-dep-graph -O +//@ build-pass #![feature(rustc_attrs)] #![crate_type="rlib"] diff --git a/tests/incremental/type_alias_cross_crate/auxiliary/a.rs b/tests/incremental/type_alias_cross_crate/auxiliary/a.rs index 61fe297d73dd..bb3703dd7faa 100644 --- a/tests/incremental/type_alias_cross_crate/auxiliary/a.rs +++ b/tests/incremental/type_alias_cross_crate/auxiliary/a.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z query-dep-graph +//@ compile-flags: -Z query-dep-graph #![crate_type="rlib"] diff --git a/tests/incremental/type_alias_cross_crate/b.rs b/tests/incremental/type_alias_cross_crate/b.rs index f6c2526841c2..7187336ba5ee 100644 --- a/tests/incremental/type_alias_cross_crate/b.rs +++ b/tests/incremental/type_alias_cross_crate/b.rs @@ -1,6 +1,6 @@ -// aux-build:a.rs -// revisions:rpass1 rpass2 rpass3 -// compile-flags: -Z query-dep-graph +//@ aux-build:a.rs +//@ revisions:rpass1 rpass2 rpass3 +//@ compile-flags: -Z query-dep-graph #![feature(rustc_attrs)] diff --git a/tests/incremental/unchecked_dirty_clean.rs b/tests/incremental/unchecked_dirty_clean.rs index 3c8692a302dd..aab3333dff34 100644 --- a/tests/incremental/unchecked_dirty_clean.rs +++ b/tests/incremental/unchecked_dirty_clean.rs @@ -1,5 +1,5 @@ -// revisions: rpass1 cfail2 -// compile-flags: -Z query-dep-graph +//@ revisions: rpass1 cfail2 +//@ compile-flags: -Z query-dep-graph #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/tests/incremental/warnings-reemitted.rs b/tests/incremental/warnings-reemitted.rs index 0e6b8823241c..c38c43d46df6 100644 --- a/tests/incremental/warnings-reemitted.rs +++ b/tests/incremental/warnings-reemitted.rs @@ -1,6 +1,6 @@ -// revisions: cfail1 cfail2 cfail3 -// compile-flags: -Coverflow-checks=on -// build-pass +//@ revisions: cfail1 cfail2 cfail3 +//@ compile-flags: -Coverflow-checks=on +//@ build-pass #![warn(arithmetic_overflow)] diff --git a/tests/mir-opt/array_index_is_temporary.rs b/tests/mir-opt/array_index_is_temporary.rs index f5edc68905b6..3e5d5d5dd27f 100644 --- a/tests/mir-opt/array_index_is_temporary.rs +++ b/tests/mir-opt/array_index_is_temporary.rs @@ -1,4 +1,4 @@ -// unit-test: SimplifyCfg-elaborate-drops +//@ unit-test: SimplifyCfg-elaborate-drops // EMIT_MIR_FOR_EACH_PANIC_STRATEGY // Retagging (from Stacked Borrows) relies on the array index being a fresh // temporary, so that side-effects cannot change it. diff --git a/tests/mir-opt/asm_unwind_panic_abort.rs b/tests/mir-opt/asm_unwind_panic_abort.rs index a80dcb385b33..d6830e12287e 100644 --- a/tests/mir-opt/asm_unwind_panic_abort.rs +++ b/tests/mir-opt/asm_unwind_panic_abort.rs @@ -1,9 +1,9 @@ //! Tests that unwinding from an asm block is caught and forced to abort //! when `-C panic=abort`. -// only-x86_64 -// compile-flags: -C panic=abort -// no-prefer-dynamic +//@ only-x86_64 +//@ compile-flags: -C panic=abort +//@ no-prefer-dynamic #![feature(asm_unwind)] diff --git a/tests/mir-opt/async_closure_shims.rs b/tests/mir-opt/async_closure_shims.rs index 2c99a2dad37a..5e8753214001 100644 --- a/tests/mir-opt/async_closure_shims.rs +++ b/tests/mir-opt/async_closure_shims.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 // skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY diff --git a/tests/mir-opt/basic_assignment.rs b/tests/mir-opt/basic_assignment.rs index 30a410988885..0a23cddf620b 100644 --- a/tests/mir-opt/basic_assignment.rs +++ b/tests/mir-opt/basic_assignment.rs @@ -1,5 +1,5 @@ -// unit-test: ElaborateDrops -// needs-unwind +//@ unit-test: ElaborateDrops +//@ needs-unwind // this tests move up progration, which is not yet implemented // EMIT_MIR basic_assignment.main.ElaborateDrops.diff diff --git a/tests/mir-opt/box_expr.rs b/tests/mir-opt/box_expr.rs index 0421e232ae4a..8c016629770b 100644 --- a/tests/mir-opt/box_expr.rs +++ b/tests/mir-opt/box_expr.rs @@ -1,5 +1,5 @@ -// unit-test: ElaborateDrops -// needs-unwind +//@ unit-test: ElaborateDrops +//@ needs-unwind #![feature(rustc_attrs, stmt_expr_attributes)] diff --git a/tests/mir-opt/building/async_await.rs b/tests/mir-opt/building/async_await.rs index abdeafef6e44..6c44570d109c 100644 --- a/tests/mir-opt/building/async_await.rs +++ b/tests/mir-opt/building/async_await.rs @@ -3,8 +3,8 @@ // `get_context`, and that the MIR argument type for an async fn and all locals // related to `yield` are `&mut Context`, and its return type is `Poll`. -// edition:2018 -// compile-flags: -C panic=abort +//@ edition:2018 +//@ compile-flags: -C panic=abort #![crate_type = "lib"] diff --git a/tests/mir-opt/building/custom/operators.rs b/tests/mir-opt/building/custom/operators.rs index 91bdf2b9113c..bc72ed8dfe39 100644 --- a/tests/mir-opt/building/custom/operators.rs +++ b/tests/mir-opt/building/custom/operators.rs @@ -1,5 +1,5 @@ // skip-filecheck -// compile-flags: --crate-type=lib +//@ compile-flags: --crate-type=lib #![feature(custom_mir, core_intrinsics, inline_const)] use std::intrinsics::mir::*; diff --git a/tests/mir-opt/building/custom/unwind_action.rs b/tests/mir-opt/building/custom/unwind_action.rs index 0dfbf780f676..e3d54c721457 100644 --- a/tests/mir-opt/building/custom/unwind_action.rs +++ b/tests/mir-opt/building/custom/unwind_action.rs @@ -1,6 +1,6 @@ -// compile-flags: --crate-type=lib -// edition:2021 -// needs-unwind +//@ compile-flags: --crate-type=lib +//@ edition:2021 +//@ needs-unwind #![feature(custom_mir, core_intrinsics)] use core::intrinsics::mir::*; diff --git a/tests/mir-opt/building/custom/unwind_terminate.rs b/tests/mir-opt/building/custom/unwind_terminate.rs index efdf2ddb1d02..c5374fa7b690 100644 --- a/tests/mir-opt/building/custom/unwind_terminate.rs +++ b/tests/mir-opt/building/custom/unwind_terminate.rs @@ -1,5 +1,5 @@ -// compile-flags: --crate-type=lib -// edition:2021 +//@ compile-flags: --crate-type=lib +//@ edition:2021 #![feature(custom_mir, core_intrinsics)] use core::intrinsics::mir::*; diff --git a/tests/mir-opt/building/logical_or_in_conditional.rs b/tests/mir-opt/building/logical_or_in_conditional.rs index 00e666ed94f0..deb841f2b0d5 100644 --- a/tests/mir-opt/building/logical_or_in_conditional.rs +++ b/tests/mir-opt/building/logical_or_in_conditional.rs @@ -1,5 +1,5 @@ // skip-filecheck -// compile-flags: -Z validate-mir +//@ compile-flags: -Z validate-mir #![feature(let_chains)] struct Droppy(u8); impl Drop for Droppy { diff --git a/tests/mir-opt/building/shifts.rs b/tests/mir-opt/building/shifts.rs index c94a142d3362..849d7b55f3a0 100644 --- a/tests/mir-opt/building/shifts.rs +++ b/tests/mir-opt/building/shifts.rs @@ -1,5 +1,5 @@ // skip-filecheck -// compile-flags: -C debug-assertions=yes +//@ compile-flags: -C debug-assertions=yes // EMIT_MIR shifts.shift_signed.built.after.mir fn shift_signed(small: i8, big: u128, a: i8, b: i32, c: i128) -> ([i8; 3], [u128; 3]) { diff --git a/tests/mir-opt/building/while_storage.rs b/tests/mir-opt/building/while_storage.rs index b06c1639c3f3..83095316f005 100644 --- a/tests/mir-opt/building/while_storage.rs +++ b/tests/mir-opt/building/while_storage.rs @@ -1,7 +1,7 @@ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY // Test that we correctly generate StorageDead statements for while loop // conditions on all branches -// compile-flags: -Zmir-opt-level=0 +//@ compile-flags: -Zmir-opt-level=0 fn get_bool(c: bool) -> bool { c diff --git a/tests/mir-opt/byte_slice.rs b/tests/mir-opt/byte_slice.rs index 813d9ccfdc26..c064e2945fd2 100644 --- a/tests/mir-opt/byte_slice.rs +++ b/tests/mir-opt/byte_slice.rs @@ -1,5 +1,5 @@ // skip-filecheck -// compile-flags: -Z mir-opt-level=0 +//@ compile-flags: -Z mir-opt-level=0 // EMIT_MIR byte_slice.main.SimplifyCfg-elaborate-drops.after.mir fn main() { diff --git a/tests/mir-opt/const_allocation.rs b/tests/mir-opt/const_allocation.rs index 5b5fb524fdb3..038caaa0ae73 100644 --- a/tests/mir-opt/const_allocation.rs +++ b/tests/mir-opt/const_allocation.rs @@ -1,6 +1,6 @@ // skip-filecheck -// unit-test: GVN -// ignore-endian-big +//@ unit-test: GVN +//@ ignore-endian-big // EMIT_MIR_FOR_EACH_BIT_WIDTH static FOO: &[(Option, &[&str])] = &[(None, &[]), (None, &["foo", "bar"]), (Some(42), &["meh", "mop", "möp"])]; diff --git a/tests/mir-opt/const_allocation2.rs b/tests/mir-opt/const_allocation2.rs index 171592889d57..ba987c1c26b9 100644 --- a/tests/mir-opt/const_allocation2.rs +++ b/tests/mir-opt/const_allocation2.rs @@ -1,6 +1,6 @@ // skip-filecheck -// unit-test: GVN -// ignore-endian-big +//@ unit-test: GVN +//@ ignore-endian-big // EMIT_MIR_FOR_EACH_BIT_WIDTH // EMIT_MIR const_allocation2.main.GVN.after.mir fn main() { diff --git a/tests/mir-opt/const_allocation3.rs b/tests/mir-opt/const_allocation3.rs index 91a30f0587bf..86ffdef24aba 100644 --- a/tests/mir-opt/const_allocation3.rs +++ b/tests/mir-opt/const_allocation3.rs @@ -1,6 +1,6 @@ // skip-filecheck -// unit-test: GVN -// ignore-endian-big +//@ unit-test: GVN +//@ ignore-endian-big // EMIT_MIR_FOR_EACH_BIT_WIDTH // EMIT_MIR const_allocation3.main.GVN.after.mir fn main() { diff --git a/tests/mir-opt/const_debuginfo.rs b/tests/mir-opt/const_debuginfo.rs index db0c5dbb28fa..319bcf484111 100644 --- a/tests/mir-opt/const_debuginfo.rs +++ b/tests/mir-opt/const_debuginfo.rs @@ -1,5 +1,5 @@ -// unit-test: ConstDebugInfo -// compile-flags: -C overflow-checks=no -Zmir-enable-passes=+GVN +//@ unit-test: ConstDebugInfo +//@ compile-flags: -C overflow-checks=no -Zmir-enable-passes=+GVN struct Point { x: u32, diff --git a/tests/mir-opt/const_goto_const_eval_fail.rs b/tests/mir-opt/const_goto_const_eval_fail.rs index c0e8e144b152..fa0f5f614590 100644 --- a/tests/mir-opt/const_goto_const_eval_fail.rs +++ b/tests/mir-opt/const_goto_const_eval_fail.rs @@ -2,7 +2,7 @@ #![feature(min_const_generics)] #![crate_type = "lib"] -// compile-flags: -Zunsound-mir-opts +//@ compile-flags: -Zunsound-mir-opts // If const eval fails, then don't crash // EMIT_MIR const_goto_const_eval_fail.f.JumpThreading.diff diff --git a/tests/mir-opt/const_promotion_extern_static.rs b/tests/mir-opt/const_promotion_extern_static.rs index edc3a522338c..077e74e91f43 100644 --- a/tests/mir-opt/const_promotion_extern_static.rs +++ b/tests/mir-opt/const_promotion_extern_static.rs @@ -1,5 +1,5 @@ // skip-filecheck -// ignore-endian-big +//@ ignore-endian-big extern "C" { static X: i32; } diff --git a/tests/mir-opt/const_prop/address_of_pair.rs b/tests/mir-opt/const_prop/address_of_pair.rs index 1ab8a6028233..c6bd57669903 100644 --- a/tests/mir-opt/const_prop/address_of_pair.rs +++ b/tests/mir-opt/const_prop/address_of_pair.rs @@ -1,4 +1,4 @@ -// unit-test: GVN +//@ unit-test: GVN // EMIT_MIR address_of_pair.fn0.GVN.diff pub fn fn0() -> bool { diff --git a/tests/mir-opt/const_prop/aggregate.rs b/tests/mir-opt/const_prop/aggregate.rs index 3dd37b5910ef..2db477077728 100644 --- a/tests/mir-opt/const_prop/aggregate.rs +++ b/tests/mir-opt/const_prop/aggregate.rs @@ -1,6 +1,6 @@ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -// unit-test: GVN -// compile-flags: -O +//@ unit-test: GVN +//@ compile-flags: -O // EMIT_MIR aggregate.main.GVN.diff fn main() { diff --git a/tests/mir-opt/const_prop/array_index.rs b/tests/mir-opt/const_prop/array_index.rs index 2ae5087751f2..2a9ca5f95e65 100644 --- a/tests/mir-opt/const_prop/array_index.rs +++ b/tests/mir-opt/const_prop/array_index.rs @@ -1,4 +1,4 @@ -// unit-test: GVN +//@ unit-test: GVN // EMIT_MIR_FOR_EACH_PANIC_STRATEGY // EMIT_MIR_FOR_EACH_BIT_WIDTH diff --git a/tests/mir-opt/const_prop/bad_op_div_by_zero.rs b/tests/mir-opt/const_prop/bad_op_div_by_zero.rs index 2ba53a80c43d..c411d3b59ab2 100644 --- a/tests/mir-opt/const_prop/bad_op_div_by_zero.rs +++ b/tests/mir-opt/const_prop/bad_op_div_by_zero.rs @@ -1,4 +1,4 @@ -// unit-test: GVN +//@ unit-test: GVN // EMIT_MIR_FOR_EACH_PANIC_STRATEGY // EMIT_MIR bad_op_div_by_zero.main.GVN.diff diff --git a/tests/mir-opt/const_prop/bad_op_mod_by_zero.rs b/tests/mir-opt/const_prop/bad_op_mod_by_zero.rs index 9ab57750de0b..aa09c1639b35 100644 --- a/tests/mir-opt/const_prop/bad_op_mod_by_zero.rs +++ b/tests/mir-opt/const_prop/bad_op_mod_by_zero.rs @@ -1,4 +1,4 @@ -// unit-test: GVN +//@ unit-test: GVN // EMIT_MIR_FOR_EACH_PANIC_STRATEGY // EMIT_MIR bad_op_mod_by_zero.main.GVN.diff diff --git a/tests/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.rs b/tests/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.rs index c6d63f0bf184..25d513e21327 100644 --- a/tests/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.rs +++ b/tests/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.rs @@ -1,4 +1,4 @@ -// unit-test: GVN +//@ unit-test: GVN // EMIT_MIR_FOR_EACH_PANIC_STRATEGY // EMIT_MIR_FOR_EACH_BIT_WIDTH diff --git a/tests/mir-opt/const_prop/boolean_identities.rs b/tests/mir-opt/const_prop/boolean_identities.rs index 3b7ea25ad46e..cbc106aa41ca 100644 --- a/tests/mir-opt/const_prop/boolean_identities.rs +++ b/tests/mir-opt/const_prop/boolean_identities.rs @@ -1,4 +1,4 @@ -// unit-test: GVN +//@ unit-test: GVN // EMIT_MIR boolean_identities.test.GVN.diff pub fn test(x: bool, y: bool) -> bool { diff --git a/tests/mir-opt/const_prop/boxes.rs b/tests/mir-opt/const_prop/boxes.rs index d2d61f86d5eb..859491cf3614 100644 --- a/tests/mir-opt/const_prop/boxes.rs +++ b/tests/mir-opt/const_prop/boxes.rs @@ -1,5 +1,5 @@ -// unit-test: GVN -// compile-flags: -O +//@ unit-test: GVN +//@ compile-flags: -O // EMIT_MIR_FOR_EACH_PANIC_STRATEGY #![feature(rustc_attrs, stmt_expr_attributes)] diff --git a/tests/mir-opt/const_prop/cast.rs b/tests/mir-opt/const_prop/cast.rs index 00a8bcd1adbe..ad95515b41b5 100644 --- a/tests/mir-opt/const_prop/cast.rs +++ b/tests/mir-opt/const_prop/cast.rs @@ -1,4 +1,4 @@ -// unit-test: GVN +//@ unit-test: GVN // EMIT_MIR cast.main.GVN.diff fn main() { diff --git a/tests/mir-opt/const_prop/checked_add.rs b/tests/mir-opt/const_prop/checked_add.rs index 0abcb5dd3d42..6f43e6abdc1e 100644 --- a/tests/mir-opt/const_prop/checked_add.rs +++ b/tests/mir-opt/const_prop/checked_add.rs @@ -1,6 +1,6 @@ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -// unit-test: GVN -// compile-flags: -C overflow-checks=on +//@ unit-test: GVN +//@ compile-flags: -C overflow-checks=on // EMIT_MIR checked_add.main.GVN.diff fn main() { diff --git a/tests/mir-opt/const_prop/control_flow_simplification.rs b/tests/mir-opt/const_prop/control_flow_simplification.rs index 3cb9a4911a9d..eb336827dc29 100644 --- a/tests/mir-opt/const_prop/control_flow_simplification.rs +++ b/tests/mir-opt/const_prop/control_flow_simplification.rs @@ -1,7 +1,7 @@ // skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -// unit-test: GVN -// compile-flags: -Zmir-opt-level=1 +//@ unit-test: GVN +//@ compile-flags: -Zmir-opt-level=1 trait NeedsDrop: Sized { const NEEDS: bool = std::mem::needs_drop::(); diff --git a/tests/mir-opt/const_prop/discriminant.rs b/tests/mir-opt/const_prop/discriminant.rs index 53874e9528ef..51542afa4bc3 100644 --- a/tests/mir-opt/const_prop/discriminant.rs +++ b/tests/mir-opt/const_prop/discriminant.rs @@ -1,4 +1,4 @@ -// unit-test: GVN +//@ unit-test: GVN // FIXME(wesleywiser): Ideally, we could const-prop away all of this and just be left with // `let x = 42` but that doesn't work because const-prop doesn't support `Operand::Indirect` diff --git a/tests/mir-opt/const_prop/indirect.rs b/tests/mir-opt/const_prop/indirect.rs index d089418e8984..5c469c5d844a 100644 --- a/tests/mir-opt/const_prop/indirect.rs +++ b/tests/mir-opt/const_prop/indirect.rs @@ -1,6 +1,6 @@ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -// unit-test: GVN -// compile-flags: -C overflow-checks=on +//@ unit-test: GVN +//@ compile-flags: -C overflow-checks=on // EMIT_MIR indirect.main.GVN.diff fn main() { diff --git a/tests/mir-opt/const_prop/indirect_mutation.rs b/tests/mir-opt/const_prop/indirect_mutation.rs index a4236060c814..b2a9d5db367a 100644 --- a/tests/mir-opt/const_prop/indirect_mutation.rs +++ b/tests/mir-opt/const_prop/indirect_mutation.rs @@ -1,4 +1,4 @@ -// unit-test: GVN +//@ unit-test: GVN // Check that we do not propagate past an indirect mutation. #![feature(raw_ref_op)] diff --git a/tests/mir-opt/const_prop/inherit_overflow.rs b/tests/mir-opt/const_prop/inherit_overflow.rs index c5b1dbe37a95..e71a05ce760b 100644 --- a/tests/mir-opt/const_prop/inherit_overflow.rs +++ b/tests/mir-opt/const_prop/inherit_overflow.rs @@ -1,6 +1,6 @@ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -// unit-test: GVN -// compile-flags: -Zmir-enable-passes=+Inline +//@ unit-test: GVN +//@ compile-flags: -Zmir-enable-passes=+Inline // After inlining, this will contain a `CheckedBinaryOp`. // Propagating the overflow is ok as codegen will just skip emitting the panic. diff --git a/tests/mir-opt/const_prop/invalid_constant.rs b/tests/mir-opt/const_prop/invalid_constant.rs index 142f148d064b..1df82f2ee79d 100644 --- a/tests/mir-opt/const_prop/invalid_constant.rs +++ b/tests/mir-opt/const_prop/invalid_constant.rs @@ -1,6 +1,6 @@ // skip-filecheck -// unit-test: GVN -// compile-flags: -Zmir-enable-passes=+RemoveZsts +//@ unit-test: GVN +//@ compile-flags: -Zmir-enable-passes=+RemoveZsts // Verify that we can pretty print invalid constants. #![feature(adt_const_params)] diff --git a/tests/mir-opt/const_prop/issue_66971.rs b/tests/mir-opt/const_prop/issue_66971.rs index 30f8ea1606a7..30a9d62d499e 100644 --- a/tests/mir-opt/const_prop/issue_66971.rs +++ b/tests/mir-opt/const_prop/issue_66971.rs @@ -1,5 +1,5 @@ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -// unit-test: GVN +//@ unit-test: GVN // Due to a bug in propagating scalar pairs the assertion below used to fail. In the expected // outputs below, after GVN this is how _2 would look like with the bug: diff --git a/tests/mir-opt/const_prop/issue_67019.rs b/tests/mir-opt/const_prop/issue_67019.rs index e589ed4edccf..bf788b924ce1 100644 --- a/tests/mir-opt/const_prop/issue_67019.rs +++ b/tests/mir-opt/const_prop/issue_67019.rs @@ -1,5 +1,5 @@ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -// unit-test: GVN +//@ unit-test: GVN // This used to ICE in const-prop diff --git a/tests/mir-opt/const_prop/large_array_index.rs b/tests/mir-opt/const_prop/large_array_index.rs index 12507b9434f4..1cefc85676ff 100644 --- a/tests/mir-opt/const_prop/large_array_index.rs +++ b/tests/mir-opt/const_prop/large_array_index.rs @@ -1,5 +1,5 @@ // skip-filecheck -// unit-test: GVN +//@ unit-test: GVN // EMIT_MIR_FOR_EACH_PANIC_STRATEGY // EMIT_MIR_FOR_EACH_BIT_WIDTH diff --git a/tests/mir-opt/const_prop/mult_by_zero.rs b/tests/mir-opt/const_prop/mult_by_zero.rs index b8afaeef43fd..d79f3e851615 100644 --- a/tests/mir-opt/const_prop/mult_by_zero.rs +++ b/tests/mir-opt/const_prop/mult_by_zero.rs @@ -1,4 +1,4 @@ -// unit-test: GVN +//@ unit-test: GVN // EMIT_MIR mult_by_zero.test.GVN.diff fn test(x: i32) -> i32 { diff --git a/tests/mir-opt/const_prop/mutable_variable.rs b/tests/mir-opt/const_prop/mutable_variable.rs index 194f39f826eb..4445bd224802 100644 --- a/tests/mir-opt/const_prop/mutable_variable.rs +++ b/tests/mir-opt/const_prop/mutable_variable.rs @@ -1,4 +1,4 @@ -// unit-test: GVN +//@ unit-test: GVN // EMIT_MIR mutable_variable.main.GVN.diff fn main() { diff --git a/tests/mir-opt/const_prop/mutable_variable_aggregate.rs b/tests/mir-opt/const_prop/mutable_variable_aggregate.rs index b59132007aa2..c2b2731b2a6c 100644 --- a/tests/mir-opt/const_prop/mutable_variable_aggregate.rs +++ b/tests/mir-opt/const_prop/mutable_variable_aggregate.rs @@ -1,4 +1,4 @@ -// unit-test: GVN +//@ unit-test: GVN // EMIT_MIR mutable_variable_aggregate.main.GVN.diff fn main() { diff --git a/tests/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.rs b/tests/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.rs index 1867f7300bd2..c9f09f878fe5 100644 --- a/tests/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.rs +++ b/tests/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.rs @@ -1,4 +1,4 @@ -// unit-test: GVN +//@ unit-test: GVN // EMIT_MIR mutable_variable_aggregate_mut_ref.main.GVN.diff fn main() { diff --git a/tests/mir-opt/const_prop/mutable_variable_aggregate_partial_read.rs b/tests/mir-opt/const_prop/mutable_variable_aggregate_partial_read.rs index d0a44d8f4a01..5b7804b11647 100644 --- a/tests/mir-opt/const_prop/mutable_variable_aggregate_partial_read.rs +++ b/tests/mir-opt/const_prop/mutable_variable_aggregate_partial_read.rs @@ -1,5 +1,5 @@ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -// unit-test: GVN +//@ unit-test: GVN // EMIT_MIR mutable_variable_aggregate_partial_read.main.GVN.diff fn main() { diff --git a/tests/mir-opt/const_prop/mutable_variable_no_prop.rs b/tests/mir-opt/const_prop/mutable_variable_no_prop.rs index 180e194928e5..9ea2e78d8b20 100644 --- a/tests/mir-opt/const_prop/mutable_variable_no_prop.rs +++ b/tests/mir-opt/const_prop/mutable_variable_no_prop.rs @@ -1,4 +1,4 @@ -// unit-test: GVN +//@ unit-test: GVN // Verify that we do not propagate the contents of this mutable static. static mut STATIC: u32 = 0x42424242; diff --git a/tests/mir-opt/const_prop/mutable_variable_unprop_assign.rs b/tests/mir-opt/const_prop/mutable_variable_unprop_assign.rs index 585363572a51..39ac1fa3c946 100644 --- a/tests/mir-opt/const_prop/mutable_variable_unprop_assign.rs +++ b/tests/mir-opt/const_prop/mutable_variable_unprop_assign.rs @@ -1,5 +1,5 @@ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -// unit-test: GVN +//@ unit-test: GVN // EMIT_MIR mutable_variable_unprop_assign.main.GVN.diff fn main() { diff --git a/tests/mir-opt/const_prop/offset_of.rs b/tests/mir-opt/const_prop/offset_of.rs index f15d15bfcb26..7d258f2e3628 100644 --- a/tests/mir-opt/const_prop/offset_of.rs +++ b/tests/mir-opt/const_prop/offset_of.rs @@ -1,5 +1,5 @@ // skip-filecheck -// unit-test: GVN +//@ unit-test: GVN // EMIT_MIR_FOR_EACH_PANIC_STRATEGY #![feature(offset_of_enum, offset_of_nested)] diff --git a/tests/mir-opt/const_prop/overwrite_with_const_with_params.rs b/tests/mir-opt/const_prop/overwrite_with_const_with_params.rs index 2a3499bf2fe4..836f837d15ff 100644 --- a/tests/mir-opt/const_prop/overwrite_with_const_with_params.rs +++ b/tests/mir-opt/const_prop/overwrite_with_const_with_params.rs @@ -1,5 +1,5 @@ -// unit-test: GVN -// compile-flags: -O +//@ unit-test: GVN +//@ compile-flags: -O // Regression test for https://github.com/rust-lang/rust/issues/118328 diff --git a/tests/mir-opt/const_prop/pointer_expose_address.rs b/tests/mir-opt/const_prop/pointer_expose_address.rs index 8944232f71ee..4d0dfecd324c 100644 --- a/tests/mir-opt/const_prop/pointer_expose_address.rs +++ b/tests/mir-opt/const_prop/pointer_expose_address.rs @@ -1,5 +1,5 @@ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -// unit-test: GVN +//@ unit-test: GVN #[inline(never)] fn read(_: usize) { } diff --git a/tests/mir-opt/const_prop/read_immutable_static.rs b/tests/mir-opt/const_prop/read_immutable_static.rs index a3d8fee65d74..ec2dbf6485a8 100644 --- a/tests/mir-opt/const_prop/read_immutable_static.rs +++ b/tests/mir-opt/const_prop/read_immutable_static.rs @@ -1,4 +1,4 @@ -// unit-test: GVN +//@ unit-test: GVN static FOO: u8 = 2; diff --git a/tests/mir-opt/const_prop/ref_deref.rs b/tests/mir-opt/const_prop/ref_deref.rs index 67de110d8bb5..20c1fba52099 100644 --- a/tests/mir-opt/const_prop/ref_deref.rs +++ b/tests/mir-opt/const_prop/ref_deref.rs @@ -1,4 +1,4 @@ -// unit-test: GVN +//@ unit-test: GVN // EMIT_MIR ref_deref.main.GVN.diff fn main() { diff --git a/tests/mir-opt/const_prop/ref_deref_project.rs b/tests/mir-opt/const_prop/ref_deref_project.rs index 0f706b91b386..59e7f1a50b80 100644 --- a/tests/mir-opt/const_prop/ref_deref_project.rs +++ b/tests/mir-opt/const_prop/ref_deref_project.rs @@ -1,5 +1,5 @@ // This does not currently propagate (#67862) -// unit-test: GVN +//@ unit-test: GVN // EMIT_MIR ref_deref_project.main.GVN.diff fn main() { diff --git a/tests/mir-opt/const_prop/reify_fn_ptr.rs b/tests/mir-opt/const_prop/reify_fn_ptr.rs index 96077d5b773b..ad73b0842195 100644 --- a/tests/mir-opt/const_prop/reify_fn_ptr.rs +++ b/tests/mir-opt/const_prop/reify_fn_ptr.rs @@ -1,4 +1,4 @@ -// unit-test: GVN +//@ unit-test: GVN // EMIT_MIR reify_fn_ptr.main.GVN.diff fn main() { diff --git a/tests/mir-opt/const_prop/repeat.rs b/tests/mir-opt/const_prop/repeat.rs index 2c8717d25bb5..d881462b877e 100644 --- a/tests/mir-opt/const_prop/repeat.rs +++ b/tests/mir-opt/const_prop/repeat.rs @@ -1,4 +1,4 @@ -// unit-test: GVN +//@ unit-test: GVN // EMIT_MIR_FOR_EACH_PANIC_STRATEGY // EMIT_MIR_FOR_EACH_BIT_WIDTH diff --git a/tests/mir-opt/const_prop/return_place.rs b/tests/mir-opt/const_prop/return_place.rs index c207bcbdd620..fea28c93dc3d 100644 --- a/tests/mir-opt/const_prop/return_place.rs +++ b/tests/mir-opt/const_prop/return_place.rs @@ -1,6 +1,6 @@ -// unit-test: GVN +//@ unit-test: GVN // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -// compile-flags: -C overflow-checks=on +//@ compile-flags: -C overflow-checks=on // EMIT_MIR return_place.add.GVN.diff // EMIT_MIR return_place.add.PreCodegen.before.mir diff --git a/tests/mir-opt/const_prop/scalar_literal_propagation.rs b/tests/mir-opt/const_prop/scalar_literal_propagation.rs index 70d0eb535918..e07774683506 100644 --- a/tests/mir-opt/const_prop/scalar_literal_propagation.rs +++ b/tests/mir-opt/const_prop/scalar_literal_propagation.rs @@ -1,4 +1,4 @@ -// unit-test: GVN +//@ unit-test: GVN // EMIT_MIR_FOR_EACH_PANIC_STRATEGY // EMIT_MIR scalar_literal_propagation.main.GVN.diff diff --git a/tests/mir-opt/const_prop/slice_len.rs b/tests/mir-opt/const_prop/slice_len.rs index a4973c099cd9..4a48f92ec2b4 100644 --- a/tests/mir-opt/const_prop/slice_len.rs +++ b/tests/mir-opt/const_prop/slice_len.rs @@ -1,5 +1,5 @@ -// unit-test: GVN -// compile-flags: -Zmir-enable-passes=+InstSimplify +//@ unit-test: GVN +//@ compile-flags: -Zmir-enable-passes=+InstSimplify // EMIT_MIR_FOR_EACH_PANIC_STRATEGY // EMIT_MIR_FOR_EACH_BIT_WIDTH diff --git a/tests/mir-opt/const_prop/switch_int.rs b/tests/mir-opt/const_prop/switch_int.rs index c81b574d1500..a176bf144389 100644 --- a/tests/mir-opt/const_prop/switch_int.rs +++ b/tests/mir-opt/const_prop/switch_int.rs @@ -1,5 +1,5 @@ -// unit-test: GVN -// compile-flags: -Zmir-enable-passes=+SimplifyConstCondition-after-const-prop +//@ unit-test: GVN +//@ compile-flags: -Zmir-enable-passes=+SimplifyConstCondition-after-const-prop // EMIT_MIR_FOR_EACH_PANIC_STRATEGY #[inline(never)] diff --git a/tests/mir-opt/const_prop/transmute.rs b/tests/mir-opt/const_prop/transmute.rs index 6ff0ba422f42..5f2d76711599 100644 --- a/tests/mir-opt/const_prop/transmute.rs +++ b/tests/mir-opt/const_prop/transmute.rs @@ -1,6 +1,6 @@ -// unit-test: GVN -// compile-flags: -O --crate-type=lib -// ignore-endian-big +//@ unit-test: GVN +//@ compile-flags: -O --crate-type=lib +//@ ignore-endian-big // EMIT_MIR_FOR_EACH_BIT_WIDTH use std::mem::transmute; diff --git a/tests/mir-opt/const_prop/tuple_literal_propagation.rs b/tests/mir-opt/const_prop/tuple_literal_propagation.rs index 6803612f0a5c..5992bb151d3e 100644 --- a/tests/mir-opt/const_prop/tuple_literal_propagation.rs +++ b/tests/mir-opt/const_prop/tuple_literal_propagation.rs @@ -1,4 +1,4 @@ -// unit-test: GVN +//@ unit-test: GVN // EMIT_MIR_FOR_EACH_PANIC_STRATEGY // EMIT_MIR tuple_literal_propagation.main.GVN.diff diff --git a/tests/mir-opt/const_prop/while_let_loops.rs b/tests/mir-opt/const_prop/while_let_loops.rs index d6527552bb04..6a421da0807d 100644 --- a/tests/mir-opt/const_prop/while_let_loops.rs +++ b/tests/mir-opt/const_prop/while_let_loops.rs @@ -1,4 +1,4 @@ -// unit-test: GVN +//@ unit-test: GVN // EMIT_MIR while_let_loops.change_loop_body.GVN.diff pub fn change_loop_body() { diff --git a/tests/mir-opt/copy-prop/borrowed_local.rs b/tests/mir-opt/copy-prop/borrowed_local.rs index af40f5bce8b2..24b8e45532cf 100644 --- a/tests/mir-opt/copy-prop/borrowed_local.rs +++ b/tests/mir-opt/copy-prop/borrowed_local.rs @@ -1,6 +1,6 @@ // skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -// unit-test: CopyProp +//@ unit-test: CopyProp #![feature(custom_mir, core_intrinsics)] #![allow(unused_assignments)] diff --git a/tests/mir-opt/copy-prop/branch.rs b/tests/mir-opt/copy-prop/branch.rs index 2785089579ff..0944bb3d59aa 100644 --- a/tests/mir-opt/copy-prop/branch.rs +++ b/tests/mir-opt/copy-prop/branch.rs @@ -1,7 +1,7 @@ // skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY //! Tests that we bail out when there are multiple assignments to the same local. -// unit-test: CopyProp +//@ unit-test: CopyProp fn val() -> i32 { 1 } diff --git a/tests/mir-opt/copy-prop/calls.rs b/tests/mir-opt/copy-prop/calls.rs index a6b5d511805c..7d123e64950c 100644 --- a/tests/mir-opt/copy-prop/calls.rs +++ b/tests/mir-opt/copy-prop/calls.rs @@ -1,7 +1,7 @@ // skip-filecheck // Check that CopyProp does propagate return values of call terminators. -// unit-test: CopyProp -// needs-unwind +//@ unit-test: CopyProp +//@ needs-unwind #![feature(custom_mir, core_intrinsics)] use std::intrinsics::mir::*; diff --git a/tests/mir-opt/copy-prop/copy_propagation_arg.rs b/tests/mir-opt/copy-prop/copy_propagation_arg.rs index 83bbefe09ed5..3516d8f7f62f 100644 --- a/tests/mir-opt/copy-prop/copy_propagation_arg.rs +++ b/tests/mir-opt/copy-prop/copy_propagation_arg.rs @@ -2,7 +2,7 @@ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY // Check that CopyProp does not propagate an assignment to a function argument // (doing so can break usages of the original argument value) -// unit-test: CopyProp +//@ unit-test: CopyProp fn dummy(x: u8) -> u8 { x } diff --git a/tests/mir-opt/copy-prop/custom_move_arg.rs b/tests/mir-opt/copy-prop/custom_move_arg.rs index 1ee294fcfd91..3577ed2a4a18 100644 --- a/tests/mir-opt/copy-prop/custom_move_arg.rs +++ b/tests/mir-opt/copy-prop/custom_move_arg.rs @@ -1,6 +1,6 @@ // skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -// unit-test: CopyProp +//@ unit-test: CopyProp #![feature(custom_mir, core_intrinsics)] #![allow(unused_assignments)] diff --git a/tests/mir-opt/copy-prop/cycle.rs b/tests/mir-opt/copy-prop/cycle.rs index 58e049fde4b5..ed97e86f83ac 100644 --- a/tests/mir-opt/copy-prop/cycle.rs +++ b/tests/mir-opt/copy-prop/cycle.rs @@ -1,7 +1,7 @@ // skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY //! Tests that cyclic assignments don't hang CopyProp, and result in reasonable code. -// unit-test: CopyProp +//@ unit-test: CopyProp fn val() -> i32 { 1 } diff --git a/tests/mir-opt/copy-prop/dead_stores_79191.rs b/tests/mir-opt/copy-prop/dead_stores_79191.rs index 81306ab613a0..f6e0eac6c2c9 100644 --- a/tests/mir-opt/copy-prop/dead_stores_79191.rs +++ b/tests/mir-opt/copy-prop/dead_stores_79191.rs @@ -1,6 +1,6 @@ // skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -// unit-test: CopyProp +//@ unit-test: CopyProp fn id(x: T) -> T { x diff --git a/tests/mir-opt/copy-prop/dead_stores_better.rs b/tests/mir-opt/copy-prop/dead_stores_better.rs index 7addf6af23bd..fdf42876909a 100644 --- a/tests/mir-opt/copy-prop/dead_stores_better.rs +++ b/tests/mir-opt/copy-prop/dead_stores_better.rs @@ -3,8 +3,8 @@ // This is a copy of the `dead_stores_79191` test, except that we turn on DSE. This demonstrates // that that pass enables this one to do more optimizations. -// unit-test: CopyProp -// compile-flags: -Zmir-enable-passes=+DeadStoreElimination +//@ unit-test: CopyProp +//@ compile-flags: -Zmir-enable-passes=+DeadStoreElimination fn id(x: T) -> T { x diff --git a/tests/mir-opt/copy-prop/issue_107511.rs b/tests/mir-opt/copy-prop/issue_107511.rs index 53fd9366276b..d9bd08b1bcf1 100644 --- a/tests/mir-opt/copy-prop/issue_107511.rs +++ b/tests/mir-opt/copy-prop/issue_107511.rs @@ -1,6 +1,6 @@ // skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -// unit-test: CopyProp +//@ unit-test: CopyProp // EMIT_MIR issue_107511.main.CopyProp.diff fn main() { diff --git a/tests/mir-opt/copy-prop/move_arg.rs b/tests/mir-opt/copy-prop/move_arg.rs index fc2932a65dd6..85ced0f6c0d5 100644 --- a/tests/mir-opt/copy-prop/move_arg.rs +++ b/tests/mir-opt/copy-prop/move_arg.rs @@ -1,7 +1,7 @@ // skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY // Test that we do not move multiple times from the same local. -// unit-test: CopyProp +//@ unit-test: CopyProp // EMIT_MIR move_arg.f.CopyProp.diff pub fn f(a: T) { diff --git a/tests/mir-opt/copy-prop/move_projection.rs b/tests/mir-opt/copy-prop/move_projection.rs index f31e82c1f030..d68ffad78bcb 100644 --- a/tests/mir-opt/copy-prop/move_projection.rs +++ b/tests/mir-opt/copy-prop/move_projection.rs @@ -1,6 +1,6 @@ // skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -// unit-test: CopyProp +//@ unit-test: CopyProp #![feature(custom_mir, core_intrinsics)] #![allow(unused_assignments)] diff --git a/tests/mir-opt/copy-prop/mutate_through_pointer.rs b/tests/mir-opt/copy-prop/mutate_through_pointer.rs index e36a10846a62..610f5401084a 100644 --- a/tests/mir-opt/copy-prop/mutate_through_pointer.rs +++ b/tests/mir-opt/copy-prop/mutate_through_pointer.rs @@ -1,5 +1,5 @@ // skip-filecheck -// unit-test: CopyProp +//@ unit-test: CopyProp // // This attempts to mutate `a` via a pointer derived from `addr_of!(a)`. That is UB // according to Miri. However, the decision to make this UB - and to allow diff --git a/tests/mir-opt/copy-prop/non_dominate.rs b/tests/mir-opt/copy-prop/non_dominate.rs index c26ac444e5c6..d8b42b7f96e5 100644 --- a/tests/mir-opt/copy-prop/non_dominate.rs +++ b/tests/mir-opt/copy-prop/non_dominate.rs @@ -1,5 +1,5 @@ // skip-filecheck -// unit-test: CopyProp +//@ unit-test: CopyProp #![feature(custom_mir, core_intrinsics)] #![allow(unused_assignments)] diff --git a/tests/mir-opt/copy-prop/partial_init.rs b/tests/mir-opt/copy-prop/partial_init.rs index 44cc203de0d4..46390556418d 100644 --- a/tests/mir-opt/copy-prop/partial_init.rs +++ b/tests/mir-opt/copy-prop/partial_init.rs @@ -1,5 +1,5 @@ // skip-filecheck -// unit-test: CopyProp +//@ unit-test: CopyProp // Verify that we do not ICE on partial initializations. #![feature(custom_mir, core_intrinsics)] diff --git a/tests/mir-opt/copy-prop/reborrow.rs b/tests/mir-opt/copy-prop/reborrow.rs index 57c4fb8ade9e..7d02fb328eef 100644 --- a/tests/mir-opt/copy-prop/reborrow.rs +++ b/tests/mir-opt/copy-prop/reborrow.rs @@ -1,7 +1,7 @@ // skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY // Check that CopyProp considers reborrows as not mutating the pointer. -// unit-test: CopyProp +//@ unit-test: CopyProp #![feature(raw_ref_op)] diff --git a/tests/mir-opt/coroutine_tiny.rs b/tests/mir-opt/coroutine_tiny.rs index 0fd785b28f87..9728425f2326 100644 --- a/tests/mir-opt/coroutine_tiny.rs +++ b/tests/mir-opt/coroutine_tiny.rs @@ -2,8 +2,8 @@ //! Tests that coroutines that cannot return or unwind don't have unnecessary //! panic branches. -// compile-flags: -C panic=abort -// no-prefer-dynamic +//@ compile-flags: -C panic=abort +//@ no-prefer-dynamic #![feature(coroutines, coroutine_trait)] diff --git a/tests/mir-opt/dataflow-const-prop/array_index.rs b/tests/mir-opt/dataflow-const-prop/array_index.rs index 8f0cc489a5bb..df8baf77add4 100644 --- a/tests/mir-opt/dataflow-const-prop/array_index.rs +++ b/tests/mir-opt/dataflow-const-prop/array_index.rs @@ -1,5 +1,5 @@ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -// unit-test: DataflowConstProp +//@ unit-test: DataflowConstProp // EMIT_MIR_FOR_EACH_BIT_WIDTH // EMIT_MIR array_index.main.DataflowConstProp.diff diff --git a/tests/mir-opt/dataflow-const-prop/boolean_identities.rs b/tests/mir-opt/dataflow-const-prop/boolean_identities.rs index c9be1d65b030..e2b7dbc096b2 100644 --- a/tests/mir-opt/dataflow-const-prop/boolean_identities.rs +++ b/tests/mir-opt/dataflow-const-prop/boolean_identities.rs @@ -1,4 +1,4 @@ -// unit-test: DataflowConstProp +//@ unit-test: DataflowConstProp // EMIT_MIR boolean_identities.test.DataflowConstProp.diff diff --git a/tests/mir-opt/dataflow-const-prop/cast.rs b/tests/mir-opt/dataflow-const-prop/cast.rs index 298ff4980393..bd6141eedd16 100644 --- a/tests/mir-opt/dataflow-const-prop/cast.rs +++ b/tests/mir-opt/dataflow-const-prop/cast.rs @@ -1,4 +1,4 @@ -// unit-test: DataflowConstProp +//@ unit-test: DataflowConstProp // EMIT_MIR cast.main.DataflowConstProp.diff diff --git a/tests/mir-opt/dataflow-const-prop/checked.rs b/tests/mir-opt/dataflow-const-prop/checked.rs index 30b0afa8334d..2c419bc98548 100644 --- a/tests/mir-opt/dataflow-const-prop/checked.rs +++ b/tests/mir-opt/dataflow-const-prop/checked.rs @@ -1,5 +1,5 @@ -// unit-test: DataflowConstProp -// compile-flags: -Coverflow-checks=on +//@ unit-test: DataflowConstProp +//@ compile-flags: -Coverflow-checks=on // EMIT_MIR_FOR_EACH_PANIC_STRATEGY // EMIT_MIR checked.main.DataflowConstProp.diff diff --git a/tests/mir-opt/dataflow-const-prop/default_boxed_slice.rs b/tests/mir-opt/dataflow-const-prop/default_boxed_slice.rs index 6c1aafcfa5df..9986d903501b 100644 --- a/tests/mir-opt/dataflow-const-prop/default_boxed_slice.rs +++ b/tests/mir-opt/dataflow-const-prop/default_boxed_slice.rs @@ -1,6 +1,6 @@ -// unit-test: DataflowConstProp -// compile-flags: -Zmir-enable-passes=+GVN,+Inline -// ignore-debug assertions change the output MIR +//@ unit-test: DataflowConstProp +//@ compile-flags: -Zmir-enable-passes=+GVN,+Inline +//@ ignore-debug assertions change the output MIR // EMIT_MIR_FOR_EACH_BIT_WIDTH // EMIT_MIR_FOR_EACH_PANIC_STRATEGY diff --git a/tests/mir-opt/dataflow-const-prop/enum.rs b/tests/mir-opt/dataflow-const-prop/enum.rs index 34792cb9f018..b00f2912519c 100644 --- a/tests/mir-opt/dataflow-const-prop/enum.rs +++ b/tests/mir-opt/dataflow-const-prop/enum.rs @@ -1,4 +1,4 @@ -// unit-test: DataflowConstProp +//@ unit-test: DataflowConstProp // EMIT_MIR_FOR_EACH_BIT_WIDTH #![feature(custom_mir, core_intrinsics, rustc_attrs)] diff --git a/tests/mir-opt/dataflow-const-prop/if.rs b/tests/mir-opt/dataflow-const-prop/if.rs index 3400068baba2..7df3bb9c42eb 100644 --- a/tests/mir-opt/dataflow-const-prop/if.rs +++ b/tests/mir-opt/dataflow-const-prop/if.rs @@ -1,4 +1,4 @@ -// unit-test: DataflowConstProp +//@ unit-test: DataflowConstProp // EMIT_MIR if.main.DataflowConstProp.diff // CHECK-LABEL: fn main( diff --git a/tests/mir-opt/dataflow-const-prop/inherit_overflow.rs b/tests/mir-opt/dataflow-const-prop/inherit_overflow.rs index b0acc31e0dbc..d0063a8e7e49 100644 --- a/tests/mir-opt/dataflow-const-prop/inherit_overflow.rs +++ b/tests/mir-opt/dataflow-const-prop/inherit_overflow.rs @@ -1,6 +1,6 @@ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -// unit-test: DataflowConstProp -// compile-flags: -Zmir-enable-passes=+Inline +//@ unit-test: DataflowConstProp +//@ compile-flags: -Zmir-enable-passes=+Inline // EMIT_MIR inherit_overflow.main.DataflowConstProp.diff // CHECK-LABEL: fn main( diff --git a/tests/mir-opt/dataflow-const-prop/issue_81605.rs b/tests/mir-opt/dataflow-const-prop/issue_81605.rs index f13c364279d4..9231bb22c4ce 100644 --- a/tests/mir-opt/dataflow-const-prop/issue_81605.rs +++ b/tests/mir-opt/dataflow-const-prop/issue_81605.rs @@ -1,4 +1,4 @@ -// unit-test: DataflowConstProp +//@ unit-test: DataflowConstProp // EMIT_MIR issue_81605.f.DataflowConstProp.diff diff --git a/tests/mir-opt/dataflow-const-prop/large_array_index.rs b/tests/mir-opt/dataflow-const-prop/large_array_index.rs index 62be2c3824fa..3a4159ab105f 100644 --- a/tests/mir-opt/dataflow-const-prop/large_array_index.rs +++ b/tests/mir-opt/dataflow-const-prop/large_array_index.rs @@ -1,4 +1,4 @@ -// unit-test: DataflowConstProp +//@ unit-test: DataflowConstProp // EMIT_MIR_FOR_EACH_PANIC_STRATEGY // EMIT_MIR_FOR_EACH_BIT_WIDTH diff --git a/tests/mir-opt/dataflow-const-prop/mult_by_zero.rs b/tests/mir-opt/dataflow-const-prop/mult_by_zero.rs index be8ce7310564..b15fba29bdf8 100644 --- a/tests/mir-opt/dataflow-const-prop/mult_by_zero.rs +++ b/tests/mir-opt/dataflow-const-prop/mult_by_zero.rs @@ -1,4 +1,4 @@ -// unit-test: DataflowConstProp +//@ unit-test: DataflowConstProp // EMIT_MIR mult_by_zero.test.DataflowConstProp.diff // CHECK-LABEL: fn test( diff --git a/tests/mir-opt/dataflow-const-prop/offset_of.rs b/tests/mir-opt/dataflow-const-prop/offset_of.rs index ed8e8fcec16e..867890dcf253 100644 --- a/tests/mir-opt/dataflow-const-prop/offset_of.rs +++ b/tests/mir-opt/dataflow-const-prop/offset_of.rs @@ -1,4 +1,4 @@ -// unit-test: DataflowConstProp +//@ unit-test: DataflowConstProp // EMIT_MIR_FOR_EACH_PANIC_STRATEGY #![feature(offset_of_nested)] diff --git a/tests/mir-opt/dataflow-const-prop/ref_without_sb.rs b/tests/mir-opt/dataflow-const-prop/ref_without_sb.rs index 7bf2b1840785..aa669fffd446 100644 --- a/tests/mir-opt/dataflow-const-prop/ref_without_sb.rs +++ b/tests/mir-opt/dataflow-const-prop/ref_without_sb.rs @@ -1,5 +1,5 @@ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -// unit-test: DataflowConstProp +//@ unit-test: DataflowConstProp #[inline(never)] fn escape(x: &T) {} diff --git a/tests/mir-opt/dataflow-const-prop/repeat.rs b/tests/mir-opt/dataflow-const-prop/repeat.rs index daa8dbaf0765..bebedbb94642 100644 --- a/tests/mir-opt/dataflow-const-prop/repeat.rs +++ b/tests/mir-opt/dataflow-const-prop/repeat.rs @@ -1,4 +1,4 @@ -// unit-test: DataflowConstProp +//@ unit-test: DataflowConstProp // EMIT_MIR_FOR_EACH_PANIC_STRATEGY // EMIT_MIR_FOR_EACH_BIT_WIDTH diff --git a/tests/mir-opt/dataflow-const-prop/repr_transparent.rs b/tests/mir-opt/dataflow-const-prop/repr_transparent.rs index 39a2b357193a..ace38364ee3f 100644 --- a/tests/mir-opt/dataflow-const-prop/repr_transparent.rs +++ b/tests/mir-opt/dataflow-const-prop/repr_transparent.rs @@ -1,4 +1,4 @@ -// unit-test: DataflowConstProp +//@ unit-test: DataflowConstProp // The struct has scalar ABI, but is not a scalar type. // Make sure that we handle this correctly. diff --git a/tests/mir-opt/dataflow-const-prop/self_assign.rs b/tests/mir-opt/dataflow-const-prop/self_assign.rs index a5b232131286..4171d2991aea 100644 --- a/tests/mir-opt/dataflow-const-prop/self_assign.rs +++ b/tests/mir-opt/dataflow-const-prop/self_assign.rs @@ -1,4 +1,4 @@ -// unit-test: DataflowConstProp +//@ unit-test: DataflowConstProp // EMIT_MIR self_assign.main.DataflowConstProp.diff diff --git a/tests/mir-opt/dataflow-const-prop/self_assign_add.rs b/tests/mir-opt/dataflow-const-prop/self_assign_add.rs index 7bfbda7a96c6..d958025c7077 100644 --- a/tests/mir-opt/dataflow-const-prop/self_assign_add.rs +++ b/tests/mir-opt/dataflow-const-prop/self_assign_add.rs @@ -1,4 +1,4 @@ -// unit-test: DataflowConstProp +//@ unit-test: DataflowConstProp // EMIT_MIR self_assign_add.main.DataflowConstProp.diff diff --git a/tests/mir-opt/dataflow-const-prop/sibling_ptr.rs b/tests/mir-opt/dataflow-const-prop/sibling_ptr.rs index 9c610aabe821..ad24c5855b8b 100644 --- a/tests/mir-opt/dataflow-const-prop/sibling_ptr.rs +++ b/tests/mir-opt/dataflow-const-prop/sibling_ptr.rs @@ -6,7 +6,7 @@ // used to modify `x.1` - if it did not, then it might incorrectly assume that it // can infer the value of `x.1` at the end of this function. -// unit-test: DataflowConstProp +//@ unit-test: DataflowConstProp // EMIT_MIR sibling_ptr.main.DataflowConstProp.diff diff --git a/tests/mir-opt/dataflow-const-prop/slice_len.rs b/tests/mir-opt/dataflow-const-prop/slice_len.rs index 65c87580330f..08707779e2c8 100644 --- a/tests/mir-opt/dataflow-const-prop/slice_len.rs +++ b/tests/mir-opt/dataflow-const-prop/slice_len.rs @@ -1,6 +1,6 @@ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -// unit-test: DataflowConstProp -// compile-flags: -Zmir-enable-passes=+InstSimplify +//@ unit-test: DataflowConstProp +//@ compile-flags: -Zmir-enable-passes=+InstSimplify // EMIT_MIR_FOR_EACH_BIT_WIDTH // EMIT_MIR slice_len.main.DataflowConstProp.diff diff --git a/tests/mir-opt/dataflow-const-prop/struct.rs b/tests/mir-opt/dataflow-const-prop/struct.rs index a7e0f6a987d5..0180e978a09f 100644 --- a/tests/mir-opt/dataflow-const-prop/struct.rs +++ b/tests/mir-opt/dataflow-const-prop/struct.rs @@ -1,4 +1,4 @@ -// unit-test: DataflowConstProp +//@ unit-test: DataflowConstProp // EMIT_MIR_FOR_EACH_BIT_WIDTH #[derive(Copy, Clone)] diff --git a/tests/mir-opt/dataflow-const-prop/terminator.rs b/tests/mir-opt/dataflow-const-prop/terminator.rs index 4472861f132d..d33f3216933a 100644 --- a/tests/mir-opt/dataflow-const-prop/terminator.rs +++ b/tests/mir-opt/dataflow-const-prop/terminator.rs @@ -1,5 +1,5 @@ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -// unit-test: DataflowConstProp +//@ unit-test: DataflowConstProp fn foo(n: i32) {} diff --git a/tests/mir-opt/dataflow-const-prop/transmute.rs b/tests/mir-opt/dataflow-const-prop/transmute.rs index bb85e4586787..7cf0dad5e483 100644 --- a/tests/mir-opt/dataflow-const-prop/transmute.rs +++ b/tests/mir-opt/dataflow-const-prop/transmute.rs @@ -1,6 +1,6 @@ -// unit-test: DataflowConstProp -// compile-flags: -O --crate-type=lib -// ignore-endian-big +//@ unit-test: DataflowConstProp +//@ compile-flags: -O --crate-type=lib +//@ ignore-endian-big // EMIT_MIR_FOR_EACH_BIT_WIDTH use std::mem::transmute; diff --git a/tests/mir-opt/dataflow-const-prop/tuple.rs b/tests/mir-opt/dataflow-const-prop/tuple.rs index 563558da04a5..5d7c38970f6c 100644 --- a/tests/mir-opt/dataflow-const-prop/tuple.rs +++ b/tests/mir-opt/dataflow-const-prop/tuple.rs @@ -1,4 +1,4 @@ -// unit-test: DataflowConstProp +//@ unit-test: DataflowConstProp // EMIT_MIR_FOR_EACH_BIT_WIDTH // EMIT_MIR tuple.main.DataflowConstProp.diff diff --git a/tests/mir-opt/dead-store-elimination/call_arg_copy.rs b/tests/mir-opt/dead-store-elimination/call_arg_copy.rs index 37b3313f7d04..2ce1e9023a76 100644 --- a/tests/mir-opt/dead-store-elimination/call_arg_copy.rs +++ b/tests/mir-opt/dead-store-elimination/call_arg_copy.rs @@ -1,6 +1,6 @@ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -// unit-test: DeadStoreElimination-final -// compile-flags: -Zmir-enable-passes=+CopyProp +//@ unit-test: DeadStoreElimination-final +//@ compile-flags: -Zmir-enable-passes=+CopyProp #![feature(core_intrinsics)] #![feature(custom_mir)] diff --git a/tests/mir-opt/dead-store-elimination/cycle.rs b/tests/mir-opt/dead-store-elimination/cycle.rs index e8f566b4aa7b..ddbc89a7ae2c 100644 --- a/tests/mir-opt/dead-store-elimination/cycle.rs +++ b/tests/mir-opt/dead-store-elimination/cycle.rs @@ -1,8 +1,8 @@ // This example is interesting because the non-transitive version of `MaybeLiveLocals` would // report that *all* of these stores are live. // -// needs-unwind -// unit-test: DeadStoreElimination-initial +//@ needs-unwind +//@ unit-test: DeadStoreElimination-initial #![feature(core_intrinsics, custom_mir)] use std::intrinsics::mir::*; diff --git a/tests/mir-opt/dead-store-elimination/place_mention.rs b/tests/mir-opt/dead-store-elimination/place_mention.rs index ae75e622ff7f..d276f6fa0259 100644 --- a/tests/mir-opt/dead-store-elimination/place_mention.rs +++ b/tests/mir-opt/dead-store-elimination/place_mention.rs @@ -1,8 +1,8 @@ // Verify that we account for the `PlaceMention` statement as a use of the tuple, // and don't remove it as a dead store. // -// unit-test: DeadStoreElimination-initial -// compile-flags: -Zmir-keep-place-mention +//@ unit-test: DeadStoreElimination-initial +//@ compile-flags: -Zmir-keep-place-mention // EMIT_MIR place_mention.main.DeadStoreElimination-initial.diff fn main() { diff --git a/tests/mir-opt/dead-store-elimination/provenance_soundness.rs b/tests/mir-opt/dead-store-elimination/provenance_soundness.rs index 916c393b9de0..96268cd957ef 100644 --- a/tests/mir-opt/dead-store-elimination/provenance_soundness.rs +++ b/tests/mir-opt/dead-store-elimination/provenance_soundness.rs @@ -1,6 +1,6 @@ // Test that we don't remove pointer to int casts or retags -// unit-test: DeadStoreElimination-initial -// compile-flags: -Zmir-emit-retag +//@ unit-test: DeadStoreElimination-initial +//@ compile-flags: -Zmir-emit-retag // EMIT_MIR provenance_soundness.pointer_to_int.DeadStoreElimination-initial.diff fn pointer_to_int(p: *mut i32) { diff --git a/tests/mir-opt/deduplicate_blocks.rs b/tests/mir-opt/deduplicate_blocks.rs index d3b89102f0ca..7979fdfe768c 100644 --- a/tests/mir-opt/deduplicate_blocks.rs +++ b/tests/mir-opt/deduplicate_blocks.rs @@ -1,6 +1,6 @@ // skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -// unit-test: DeduplicateBlocks +//@ unit-test: DeduplicateBlocks // EMIT_MIR deduplicate_blocks.is_line_doc_comment_2.DeduplicateBlocks.diff pub const fn is_line_doc_comment_2(s: &str) -> bool { diff --git a/tests/mir-opt/deref-patterns/string.rs b/tests/mir-opt/deref-patterns/string.rs index 0c8385b5c483..bb4b5379b275 100644 --- a/tests/mir-opt/deref-patterns/string.rs +++ b/tests/mir-opt/deref-patterns/string.rs @@ -1,5 +1,5 @@ // skip-filecheck -// compile-flags: -Z mir-opt-level=0 -C panic=abort +//@ compile-flags: -Z mir-opt-level=0 -C panic=abort #![feature(string_deref_patterns)] #![crate_type = "lib"] diff --git a/tests/mir-opt/derefer_complex_case.rs b/tests/mir-opt/derefer_complex_case.rs index 6097d8739fb5..bdaf83fcb5bf 100644 --- a/tests/mir-opt/derefer_complex_case.rs +++ b/tests/mir-opt/derefer_complex_case.rs @@ -1,5 +1,5 @@ // skip-filecheck -// unit-test: Derefer +//@ unit-test: Derefer // EMIT_MIR derefer_complex_case.main.Derefer.diff // EMIT_MIR_FOR_EACH_PANIC_STRATEGY diff --git a/tests/mir-opt/derefer_inline_test.rs b/tests/mir-opt/derefer_inline_test.rs index 713c051f44ad..89de514a2808 100644 --- a/tests/mir-opt/derefer_inline_test.rs +++ b/tests/mir-opt/derefer_inline_test.rs @@ -1,5 +1,5 @@ // skip-filecheck -// unit-test: Derefer +//@ unit-test: Derefer // EMIT_MIR derefer_inline_test.main.Derefer.diff // EMIT_MIR_FOR_EACH_PANIC_STRATEGY diff --git a/tests/mir-opt/derefer_terminator_test.rs b/tests/mir-opt/derefer_terminator_test.rs index 3780ff5df7df..e225db5bbe8a 100644 --- a/tests/mir-opt/derefer_terminator_test.rs +++ b/tests/mir-opt/derefer_terminator_test.rs @@ -1,5 +1,5 @@ // skip-filecheck -// unit-test: Derefer +//@ unit-test: Derefer // EMIT_MIR derefer_terminator_test.main.Derefer.diff // EMIT_MIR_FOR_EACH_PANIC_STRATEGY diff --git a/tests/mir-opt/derefer_test.rs b/tests/mir-opt/derefer_test.rs index 171925bb19df..e30a286805fe 100644 --- a/tests/mir-opt/derefer_test.rs +++ b/tests/mir-opt/derefer_test.rs @@ -1,5 +1,5 @@ // skip-filecheck -// unit-test: Derefer +//@ unit-test: Derefer // EMIT_MIR derefer_test.main.Derefer.diff fn main() { let mut a = (42,43); diff --git a/tests/mir-opt/derefer_test_multiple.rs b/tests/mir-opt/derefer_test_multiple.rs index ac778a9c9b74..4efc735b22eb 100644 --- a/tests/mir-opt/derefer_test_multiple.rs +++ b/tests/mir-opt/derefer_test_multiple.rs @@ -1,5 +1,5 @@ // skip-filecheck -// unit-test: Derefer +//@ unit-test: Derefer // EMIT_MIR derefer_test_multiple.main.Derefer.diff fn main () { let mut a = (42, 43); diff --git a/tests/mir-opt/dest-prop/branch.rs b/tests/mir-opt/dest-prop/branch.rs index d8c74a0aa91d..cd5513072857 100644 --- a/tests/mir-opt/dest-prop/branch.rs +++ b/tests/mir-opt/dest-prop/branch.rs @@ -1,7 +1,7 @@ // skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY //! Tests that assignment in both branches of an `if` are eliminated. -// unit-test: DestinationPropagation +//@ unit-test: DestinationPropagation fn val() -> i32 { 1 } diff --git a/tests/mir-opt/dest-prop/copy_propagation_arg.rs b/tests/mir-opt/dest-prop/copy_propagation_arg.rs index 435cf07ab0c0..f84b5fde8d88 100644 --- a/tests/mir-opt/dest-prop/copy_propagation_arg.rs +++ b/tests/mir-opt/dest-prop/copy_propagation_arg.rs @@ -2,7 +2,7 @@ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY // Check that DestinationPropagation does not propagate an assignment to a function argument // (doing so can break usages of the original argument value) -// unit-test: DestinationPropagation +//@ unit-test: DestinationPropagation fn dummy(x: u8) -> u8 { x } diff --git a/tests/mir-opt/dest-prop/cycle.rs b/tests/mir-opt/dest-prop/cycle.rs index 77cff062cc46..e6663956d782 100644 --- a/tests/mir-opt/dest-prop/cycle.rs +++ b/tests/mir-opt/dest-prop/cycle.rs @@ -1,7 +1,7 @@ // skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY //! Tests that cyclic assignments don't hang DestinationPropagation, and result in reasonable code. -// unit-test: DestinationPropagation +//@ unit-test: DestinationPropagation fn val() -> i32 { 1 } diff --git a/tests/mir-opt/dest-prop/dead_stores_79191.rs b/tests/mir-opt/dest-prop/dead_stores_79191.rs index a6fd542d3b58..b3e370966d05 100644 --- a/tests/mir-opt/dest-prop/dead_stores_79191.rs +++ b/tests/mir-opt/dest-prop/dead_stores_79191.rs @@ -1,6 +1,6 @@ // skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -// unit-test: DestinationPropagation +//@ unit-test: DestinationPropagation fn id(x: T) -> T { x diff --git a/tests/mir-opt/dest-prop/dead_stores_better.rs b/tests/mir-opt/dest-prop/dead_stores_better.rs index c9895f35cf1d..c241d71594ba 100644 --- a/tests/mir-opt/dest-prop/dead_stores_better.rs +++ b/tests/mir-opt/dest-prop/dead_stores_better.rs @@ -3,8 +3,8 @@ // This is a copy of the `dead_stores_79191` test, except that we turn on DSE. This demonstrates // that that pass enables this one to do more optimizations. -// unit-test: DestinationPropagation -// compile-flags: -Zmir-enable-passes=+DeadStoreElimination +//@ unit-test: DestinationPropagation +//@ compile-flags: -Zmir-enable-passes=+DeadStoreElimination fn id(x: T) -> T { x diff --git a/tests/mir-opt/dest-prop/simple.rs b/tests/mir-opt/dest-prop/simple.rs index 03d20962690e..4aa6b6a4876e 100644 --- a/tests/mir-opt/dest-prop/simple.rs +++ b/tests/mir-opt/dest-prop/simple.rs @@ -1,7 +1,7 @@ // skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY //! Copy of `nrvo-simple.rs`, to ensure that full dest-prop handles it too. -// unit-test: DestinationPropagation +//@ unit-test: DestinationPropagation // EMIT_MIR simple.nrvo.DestinationPropagation.diff fn nrvo(init: fn(&mut [u8; 1024])) -> [u8; 1024] { let mut buf = [0; 1024]; diff --git a/tests/mir-opt/dest-prop/union.rs b/tests/mir-opt/dest-prop/union.rs index 6d3e6d7fa760..abd1f1b2c937 100644 --- a/tests/mir-opt/dest-prop/union.rs +++ b/tests/mir-opt/dest-prop/union.rs @@ -1,7 +1,7 @@ // skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY //! Tests that we can propagate into places that are projections into unions -// compile-flags: -Zunsound-mir-opts +//@ compile-flags: -Zunsound-mir-opts fn val() -> u32 { 1 } diff --git a/tests/mir-opt/dont_inline_type_id.rs b/tests/mir-opt/dont_inline_type_id.rs index 788c2f55dc02..ae72eb11735e 100644 --- a/tests/mir-opt/dont_inline_type_id.rs +++ b/tests/mir-opt/dont_inline_type_id.rs @@ -1,6 +1,6 @@ // skip-filecheck -// unit-test: Inline -// compile-flags: --crate-type=lib -C panic=abort +//@ unit-test: Inline +//@ compile-flags: --crate-type=lib -C panic=abort use std::any::Any; use std::any::TypeId; diff --git a/tests/mir-opt/early_otherwise_branch.rs b/tests/mir-opt/early_otherwise_branch.rs index b48516c5aa1b..c984c271ccd5 100644 --- a/tests/mir-opt/early_otherwise_branch.rs +++ b/tests/mir-opt/early_otherwise_branch.rs @@ -1,5 +1,5 @@ // skip-filecheck -// unit-test: EarlyOtherwiseBranch +//@ unit-test: EarlyOtherwiseBranch // EMIT_MIR early_otherwise_branch.opt1.EarlyOtherwiseBranch.diff fn opt1(x: Option, y: Option) -> u32 { match (x, y) { diff --git a/tests/mir-opt/early_otherwise_branch_3_element_tuple.rs b/tests/mir-opt/early_otherwise_branch_3_element_tuple.rs index 2a0fba9bea41..320813475587 100644 --- a/tests/mir-opt/early_otherwise_branch_3_element_tuple.rs +++ b/tests/mir-opt/early_otherwise_branch_3_element_tuple.rs @@ -1,5 +1,5 @@ // skip-filecheck -// unit-test: EarlyOtherwiseBranch +//@ unit-test: EarlyOtherwiseBranch // EMIT_MIR early_otherwise_branch_3_element_tuple.opt1.EarlyOtherwiseBranch.diff fn opt1(x: Option, y: Option, z: Option) -> u32 { diff --git a/tests/mir-opt/early_otherwise_branch_68867.rs b/tests/mir-opt/early_otherwise_branch_68867.rs index f27527b96ab8..805d21533c5d 100644 --- a/tests/mir-opt/early_otherwise_branch_68867.rs +++ b/tests/mir-opt/early_otherwise_branch_68867.rs @@ -1,5 +1,5 @@ // skip-filecheck -// unit-test: EarlyOtherwiseBranch +//@ unit-test: EarlyOtherwiseBranch // FIXME: This test was broken by the derefer change. diff --git a/tests/mir-opt/early_otherwise_branch_noopt.rs b/tests/mir-opt/early_otherwise_branch_noopt.rs index 351640c27c52..648089e2df1d 100644 --- a/tests/mir-opt/early_otherwise_branch_noopt.rs +++ b/tests/mir-opt/early_otherwise_branch_noopt.rs @@ -1,5 +1,5 @@ // skip-filecheck -// unit-test: EarlyOtherwiseBranch +//@ unit-test: EarlyOtherwiseBranch // must not optimize as it does not follow the pattern of // left and right hand side being the same variant diff --git a/tests/mir-opt/early_otherwise_branch_soundness.rs b/tests/mir-opt/early_otherwise_branch_soundness.rs index 02c25a1bd598..b4f5821c420c 100644 --- a/tests/mir-opt/early_otherwise_branch_soundness.rs +++ b/tests/mir-opt/early_otherwise_branch_soundness.rs @@ -1,5 +1,5 @@ // skip-filecheck -// unit-test: EarlyOtherwiseBranch +//@ unit-test: EarlyOtherwiseBranch // Tests various cases that the `early_otherwise_branch` opt should *not* optimize diff --git a/tests/mir-opt/enum_opt.rs b/tests/mir-opt/enum_opt.rs index 7738c4310405..c5b3e61a4cb2 100644 --- a/tests/mir-opt/enum_opt.rs +++ b/tests/mir-opt/enum_opt.rs @@ -1,7 +1,7 @@ // skip-filecheck -// unit-test: EnumSizeOpt +//@ unit-test: EnumSizeOpt // EMIT_MIR_FOR_EACH_BIT_WIDTH -// compile-flags: -Zunsound-mir-opts +//@ compile-flags: -Zunsound-mir-opts #![feature(arbitrary_enum_discriminant, repr128)] diff --git a/tests/mir-opt/fn_ptr_shim.rs b/tests/mir-opt/fn_ptr_shim.rs index 2650cbf9704f..326188efe019 100644 --- a/tests/mir-opt/fn_ptr_shim.rs +++ b/tests/mir-opt/fn_ptr_shim.rs @@ -1,5 +1,5 @@ // skip-filecheck -// compile-flags: -Zmir-opt-level=0 +//@ compile-flags: -Zmir-opt-level=0 // Tests that the `` shim does not create a `Call` terminator with a `Self` callee // (as only `FnDef` and `FnPtr` callees are allowed in MIR). diff --git a/tests/mir-opt/funky_arms.rs b/tests/mir-opt/funky_arms.rs index eae158f9f778..189cd7951fb7 100644 --- a/tests/mir-opt/funky_arms.rs +++ b/tests/mir-opt/funky_arms.rs @@ -1,6 +1,6 @@ // skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -// compile-flags: --crate-type lib -Cdebug-assertions=no +//@ compile-flags: --crate-type lib -Cdebug-assertions=no #![feature(flt2dec)] diff --git a/tests/mir-opt/graphviz.rs b/tests/mir-opt/graphviz.rs index 61b5a2fb3d86..f5e8fd77d854 100644 --- a/tests/mir-opt/graphviz.rs +++ b/tests/mir-opt/graphviz.rs @@ -1,6 +1,6 @@ // skip-filecheck // Test graphviz output -// compile-flags: -Z dump-mir-graphviz +//@ compile-flags: -Z dump-mir-graphviz // EMIT_MIR graphviz.main.built.after.dot fn main() {} diff --git a/tests/mir-opt/gvn.rs b/tests/mir-opt/gvn.rs index fccd4484a294..6f4d1e35585b 100644 --- a/tests/mir-opt/gvn.rs +++ b/tests/mir-opt/gvn.rs @@ -1,6 +1,6 @@ -// unit-test: GVN +//@ unit-test: GVN // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -// only-64bit +//@ only-64bit #![feature(raw_ref_op)] #![feature(rustc_attrs)] diff --git a/tests/mir-opt/gvn_copy_moves.rs b/tests/mir-opt/gvn_copy_moves.rs index d216825e5e68..9d83a19e4a58 100644 --- a/tests/mir-opt/gvn_copy_moves.rs +++ b/tests/mir-opt/gvn_copy_moves.rs @@ -1,4 +1,4 @@ -// unit-test: GVN +//@ unit-test: GVN #![feature(custom_mir, core_intrinsics)] extern crate core; diff --git a/tests/mir-opt/gvn_uninhabited.rs b/tests/mir-opt/gvn_uninhabited.rs index a55b2dd763ac..5f9df7953c8e 100644 --- a/tests/mir-opt/gvn_uninhabited.rs +++ b/tests/mir-opt/gvn_uninhabited.rs @@ -1,5 +1,5 @@ -// unit-test: GVN -// compile-flags: -O +//@ unit-test: GVN +//@ compile-flags: -O // EMIT_MIR_FOR_EACH_PANIC_STRATEGY // skip-filecheck diff --git a/tests/mir-opt/if_condition_int.rs b/tests/mir-opt/if_condition_int.rs index a3dd74d9a379..2f3f64330456 100644 --- a/tests/mir-opt/if_condition_int.rs +++ b/tests/mir-opt/if_condition_int.rs @@ -1,5 +1,5 @@ // skip-filecheck -// unit-test: SimplifyComparisonIntegral +//@ unit-test: SimplifyComparisonIntegral // EMIT_MIR if_condition_int.opt_u32.SimplifyComparisonIntegral.diff // EMIT_MIR if_condition_int.opt_negative.SimplifyComparisonIntegral.diff // EMIT_MIR if_condition_int.opt_char.SimplifyComparisonIntegral.diff diff --git a/tests/mir-opt/inline/asm_unwind.rs b/tests/mir-opt/inline/asm_unwind.rs index 0ae20e522111..7708f567c717 100644 --- a/tests/mir-opt/inline/asm_unwind.rs +++ b/tests/mir-opt/inline/asm_unwind.rs @@ -1,9 +1,9 @@ // Tests inlining of `may_unwind` inline assembly. // // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -// needs-asm-support -// needs-unwind -// compile-flags: -Zinline-mir-hint-threshold=1000 +//@ needs-asm-support +//@ needs-unwind +//@ compile-flags: -Zinline-mir-hint-threshold=1000 #![feature(asm_unwind)] struct D; diff --git a/tests/mir-opt/inline/caller_with_trivial_bound.rs b/tests/mir-opt/inline/caller_with_trivial_bound.rs index 40f7f4bbab2f..2e26a9486457 100644 --- a/tests/mir-opt/inline/caller_with_trivial_bound.rs +++ b/tests/mir-opt/inline/caller_with_trivial_bound.rs @@ -1,5 +1,5 @@ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -// needs-unwind +//@ needs-unwind #![crate_type = "lib"] pub trait Factory { diff --git a/tests/mir-opt/inline/cycle.rs b/tests/mir-opt/inline/cycle.rs index c251226673d5..b2eacfe33b17 100644 --- a/tests/mir-opt/inline/cycle.rs +++ b/tests/mir-opt/inline/cycle.rs @@ -1,5 +1,5 @@ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -// compile-flags: -Zinline-mir-hint-threshold=1000 +//@ compile-flags: -Zinline-mir-hint-threshold=1000 // EMIT_MIR cycle.f.Inline.diff #[inline(always)] diff --git a/tests/mir-opt/inline/dont_ice_on_generic_rust_call.rs b/tests/mir-opt/inline/dont_ice_on_generic_rust_call.rs index ce5e1855a716..abc0ef5c61d5 100644 --- a/tests/mir-opt/inline/dont_ice_on_generic_rust_call.rs +++ b/tests/mir-opt/inline/dont_ice_on_generic_rust_call.rs @@ -1,5 +1,5 @@ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -// compile-flags: -Zmir-enable-passes=+Inline --crate-type=lib +//@ compile-flags: -Zmir-enable-passes=+Inline --crate-type=lib #![feature(fn_traits, tuple_trait, unboxed_closures)] diff --git a/tests/mir-opt/inline/indirect_destination.rs b/tests/mir-opt/inline/indirect_destination.rs index 82143d85c258..337f617e7036 100644 --- a/tests/mir-opt/inline/indirect_destination.rs +++ b/tests/mir-opt/inline/indirect_destination.rs @@ -1,8 +1,8 @@ // Test for inlining with an indirect destination place. // -// unit-test: Inline -// edition: 2021 -// needs-unwind +//@ unit-test: Inline +//@ edition: 2021 +//@ needs-unwind #![crate_type = "lib"] #![feature(custom_mir, core_intrinsics)] use core::intrinsics::mir::*; diff --git a/tests/mir-opt/inline/inline_any_operand.rs b/tests/mir-opt/inline/inline_any_operand.rs index 659b7c3a0a1f..8151949214b1 100644 --- a/tests/mir-opt/inline/inline_any_operand.rs +++ b/tests/mir-opt/inline/inline_any_operand.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z span_free_formats +//@ compile-flags: -Z span_free_formats // Tests that MIR inliner works for any operand diff --git a/tests/mir-opt/inline/inline_async.rs b/tests/mir-opt/inline/inline_async.rs index 1de87e1e43cf..c5684f51cce5 100644 --- a/tests/mir-opt/inline/inline_async.rs +++ b/tests/mir-opt/inline/inline_async.rs @@ -3,7 +3,7 @@ // The outcome of optimization is not verfied, just the absence of the cycle. // Regression test for #76181. // -// edition:2018 +//@ edition:2018 #![crate_type = "lib"] diff --git a/tests/mir-opt/inline/inline_box_fn.rs b/tests/mir-opt/inline/inline_box_fn.rs index d2da23939923..3e006016f8c3 100644 --- a/tests/mir-opt/inline/inline_box_fn.rs +++ b/tests/mir-opt/inline/inline_box_fn.rs @@ -1,6 +1,6 @@ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -// unit-test: Inline -// compile-flags: --crate-type=lib +//@ unit-test: Inline +//@ compile-flags: --crate-type=lib // EMIT_MIR inline_box_fn.call.Inline.diff fn call(x: Box) { diff --git a/tests/mir-opt/inline/inline_closure.rs b/tests/mir-opt/inline/inline_closure.rs index 65f55d49a806..9a3cf54ef078 100644 --- a/tests/mir-opt/inline/inline_closure.rs +++ b/tests/mir-opt/inline/inline_closure.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z span_free_formats +//@ compile-flags: -Z span_free_formats // Tests that MIR inliner can handle closure arguments. (#45894) diff --git a/tests/mir-opt/inline/inline_closure_borrows_arg.rs b/tests/mir-opt/inline/inline_closure_borrows_arg.rs index 1570ab057c72..367037e113c8 100644 --- a/tests/mir-opt/inline/inline_closure_borrows_arg.rs +++ b/tests/mir-opt/inline/inline_closure_borrows_arg.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z span_free_formats -Zunsound-mir-opts +//@ compile-flags: -Z span_free_formats -Zunsound-mir-opts // Tests that MIR inliner can handle closure arguments, // even when (#45894) diff --git a/tests/mir-opt/inline/inline_closure_captures.rs b/tests/mir-opt/inline/inline_closure_captures.rs index 2b08b1068872..2c2d556f9a9a 100644 --- a/tests/mir-opt/inline/inline_closure_captures.rs +++ b/tests/mir-opt/inline/inline_closure_captures.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z span_free_formats +//@ compile-flags: -Z span_free_formats // Tests that MIR inliner can handle closure captures. diff --git a/tests/mir-opt/inline/inline_compatibility.rs b/tests/mir-opt/inline/inline_compatibility.rs index 3ad880715fe6..13f28aaacd6a 100644 --- a/tests/mir-opt/inline/inline_compatibility.rs +++ b/tests/mir-opt/inline/inline_compatibility.rs @@ -1,6 +1,6 @@ // Checks that only functions with compatible attributes are inlined. -// only-x86_64 -// compile-flags: -Cpanic=abort +//@ only-x86_64 +//@ compile-flags: -Cpanic=abort #![crate_type = "lib"] #![feature(no_sanitize)] diff --git a/tests/mir-opt/inline/inline_coroutine.rs b/tests/mir-opt/inline/inline_coroutine.rs index a82586bf2bfa..9500c2261cc1 100644 --- a/tests/mir-opt/inline/inline_coroutine.rs +++ b/tests/mir-opt/inline/inline_coroutine.rs @@ -1,5 +1,5 @@ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -// compile-flags: -Zinline-mir-hint-threshold=1000 +//@ compile-flags: -Zinline-mir-hint-threshold=1000 #![feature(coroutines, coroutine_trait)] use std::ops::Coroutine; diff --git a/tests/mir-opt/inline/inline_diverging.rs b/tests/mir-opt/inline/inline_diverging.rs index 25a5b9c5c5e7..89ef0fc4a61f 100644 --- a/tests/mir-opt/inline/inline_diverging.rs +++ b/tests/mir-opt/inline/inline_diverging.rs @@ -1,7 +1,7 @@ // Tests inlining of diverging calls. // // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -// compile-flags: -Zinline-mir-hint-threshold=1000 +//@ compile-flags: -Zinline-mir-hint-threshold=1000 #![crate_type = "lib"] // EMIT_MIR inline_diverging.f.Inline.diff diff --git a/tests/mir-opt/inline/inline_instruction_set.rs b/tests/mir-opt/inline/inline_instruction_set.rs index 7cb59645587b..44faf3a4ed9a 100644 --- a/tests/mir-opt/inline/inline_instruction_set.rs +++ b/tests/mir-opt/inline/inline_instruction_set.rs @@ -2,8 +2,8 @@ // // A function is "compatible" when the *callee* has the same attribute or no attribute. // -// compile-flags: --target thumbv4t-none-eabi -// needs-llvm-components: arm +//@ compile-flags: --target thumbv4t-none-eabi +//@ needs-llvm-components: arm #![crate_type = "lib"] #![feature(rustc_attrs)] diff --git a/tests/mir-opt/inline/inline_options.rs b/tests/mir-opt/inline/inline_options.rs index b940c64f0b88..7d7c4f718bd7 100644 --- a/tests/mir-opt/inline/inline_options.rs +++ b/tests/mir-opt/inline/inline_options.rs @@ -2,8 +2,8 @@ // Checks that inlining threshold can be controlled with // inline-mir-threshold and inline-hint-threshold options. // -// compile-flags: -Zinline-mir-threshold=90 -// compile-flags: -Zinline-mir-hint-threshold=50 +//@ compile-flags: -Zinline-mir-threshold=90 +//@ compile-flags: -Zinline-mir-hint-threshold=50 // EMIT_MIR inline_options.main.Inline.after.mir fn main() { diff --git a/tests/mir-opt/inline/inline_retag.rs b/tests/mir-opt/inline/inline_retag.rs index 9fb6f709223c..5cf7f768f917 100644 --- a/tests/mir-opt/inline/inline_retag.rs +++ b/tests/mir-opt/inline/inline_retag.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z span_free_formats -Z mir-emit-retag +//@ compile-flags: -Z span_free_formats -Z mir-emit-retag // Tests that MIR inliner fixes up `Retag`'s `fn_entry` flag diff --git a/tests/mir-opt/inline/inline_trait_method.rs b/tests/mir-opt/inline/inline_trait_method.rs index b39355637a1c..34d2c205791c 100644 --- a/tests/mir-opt/inline/inline_trait_method.rs +++ b/tests/mir-opt/inline/inline_trait_method.rs @@ -1,6 +1,6 @@ // Verify that we do not inline the default impl in a trait object. // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -// compile-flags: -Z span_free_formats +//@ compile-flags: -Z span_free_formats fn main() { println!("{}", test(&())); diff --git a/tests/mir-opt/inline/inline_trait_method_2.rs b/tests/mir-opt/inline/inline_trait_method_2.rs index b0b6a7b9b01d..c3a71e63783f 100644 --- a/tests/mir-opt/inline/inline_trait_method_2.rs +++ b/tests/mir-opt/inline/inline_trait_method_2.rs @@ -1,5 +1,5 @@ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -// compile-flags: -Z span_free_formats -Z mir-opt-level=4 +//@ compile-flags: -Z span_free_formats -Z mir-opt-level=4 // EMIT_MIR inline_trait_method_2.test2.Inline.after.mir fn test2(x: &dyn X) -> bool { diff --git a/tests/mir-opt/inline/issue_78442.rs b/tests/mir-opt/inline/issue_78442.rs index f9a5234283a0..2fbe0c6c64c6 100644 --- a/tests/mir-opt/inline/issue_78442.rs +++ b/tests/mir-opt/inline/issue_78442.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z mir-opt-level=3 -Z inline-mir +//@ compile-flags: -Z mir-opt-level=3 -Z inline-mir // EMIT_MIR_FOR_EACH_PANIC_STRATEGY #![crate_type = "lib"] diff --git a/tests/mir-opt/inline/polymorphic_recursion.rs b/tests/mir-opt/inline/polymorphic_recursion.rs index f71e382e867f..0338d604635e 100644 --- a/tests/mir-opt/inline/polymorphic_recursion.rs +++ b/tests/mir-opt/inline/polymorphic_recursion.rs @@ -1,6 +1,6 @@ // skip-filecheck // Make sure that the MIR inliner does not loop indefinitely on polymorphic recursion. -// compile-flags: --crate-type lib +//@ compile-flags: --crate-type lib // Randomize `def_path_hash` by defining them under a module with different names macro_rules! emit { diff --git a/tests/mir-opt/inline/unchecked_shifts.rs b/tests/mir-opt/inline/unchecked_shifts.rs index 0de80641c9c3..2fd18f3d5ebe 100644 --- a/tests/mir-opt/inline/unchecked_shifts.rs +++ b/tests/mir-opt/inline/unchecked_shifts.rs @@ -2,8 +2,8 @@ #![crate_type = "lib"] #![feature(unchecked_shifts)] -// ignore-debug: the debug assertions prevent the inlining we are testing for -// compile-flags: -Zmir-opt-level=2 -Zinline-mir +//@ ignore-debug: the debug assertions prevent the inlining we are testing for +//@ compile-flags: -Zmir-opt-level=2 -Zinline-mir // EMIT_MIR unchecked_shifts.unchecked_shl_unsigned_smaller.Inline.diff // EMIT_MIR unchecked_shifts.unchecked_shl_unsigned_smaller.PreCodegen.after.mir diff --git a/tests/mir-opt/inline/unit_test.rs b/tests/mir-opt/inline/unit_test.rs index 0d877bb10b42..f6c3d6a58de0 100644 --- a/tests/mir-opt/inline/unit_test.rs +++ b/tests/mir-opt/inline/unit_test.rs @@ -1,5 +1,5 @@ // Check that `-Zmir-enable-passes=+Inline` does not ICE because of stolen MIR. -// unit-test: Inline +//@ unit-test: Inline // skip-filecheck #![crate_type = "lib"] diff --git a/tests/mir-opt/inline/unsized_argument.rs b/tests/mir-opt/inline/unsized_argument.rs index e8c2bc10be22..281f7fe77538 100644 --- a/tests/mir-opt/inline/unsized_argument.rs +++ b/tests/mir-opt/inline/unsized_argument.rs @@ -1,4 +1,4 @@ -// needs-unwind +//@ needs-unwind #![feature(unsized_fn_params)] #[inline(always)] diff --git a/tests/mir-opt/inline/unwrap_unchecked.rs b/tests/mir-opt/inline/unwrap_unchecked.rs index 1adf2224d976..e44e4e23a2c0 100644 --- a/tests/mir-opt/inline/unwrap_unchecked.rs +++ b/tests/mir-opt/inline/unwrap_unchecked.rs @@ -1,8 +1,8 @@ #![crate_type = "lib"] // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -// ignore-debug: the debug assertions prevent the inlining we are testing for -// compile-flags: -Zmir-opt-level=2 -Zinline-mir -Cdebug-assertions=no +//@ ignore-debug: the debug assertions prevent the inlining we are testing for +//@ compile-flags: -Zmir-opt-level=2 -Zinline-mir -Cdebug-assertions=no // EMIT_MIR unwrap_unchecked.unwrap_unchecked.Inline.diff // EMIT_MIR unwrap_unchecked.unwrap_unchecked.PreCodegen.after.mir diff --git a/tests/mir-opt/inline_generically_if_sized.rs b/tests/mir-opt/inline_generically_if_sized.rs index 1a7512a4b8d1..794ce3dabbca 100644 --- a/tests/mir-opt/inline_generically_if_sized.rs +++ b/tests/mir-opt/inline_generically_if_sized.rs @@ -1,6 +1,6 @@ // skip-filecheck -// unit-test: Inline -// compile-flags: --crate-type=lib -C panic=abort +//@ unit-test: Inline +//@ compile-flags: --crate-type=lib -C panic=abort trait Foo { fn bar(&self) -> i32; diff --git a/tests/mir-opt/instrument_coverage.rs b/tests/mir-opt/instrument_coverage.rs index f131fc0a3241..010f7bf4d80b 100644 --- a/tests/mir-opt/instrument_coverage.rs +++ b/tests/mir-opt/instrument_coverage.rs @@ -2,10 +2,10 @@ // Test that `-C instrument-coverage` injects Coverage statements. The Coverage Counter statements // are later converted into LLVM instrprof.increment intrinsics, during codegen. -// unit-test: InstrumentCoverage -// needs-profiler-support -// ignore-windows -// compile-flags: -C instrument-coverage --remap-path-prefix={{src-base}}=/the/src +//@ unit-test: InstrumentCoverage +//@ needs-profiler-support +//@ ignore-windows +//@ compile-flags: -C instrument-coverage --remap-path-prefix={{src-base}}=/the/src // EMIT_MIR instrument_coverage.main.InstrumentCoverage.diff // EMIT_MIR instrument_coverage.bar.InstrumentCoverage.diff diff --git a/tests/mir-opt/instsimplify/bool_compare.rs b/tests/mir-opt/instsimplify/bool_compare.rs index 77f427b0d7c8..47984edd669f 100644 --- a/tests/mir-opt/instsimplify/bool_compare.rs +++ b/tests/mir-opt/instsimplify/bool_compare.rs @@ -1,4 +1,4 @@ -// unit-test: InstSimplify +//@ unit-test: InstSimplify // EMIT_MIR bool_compare.eq_true.InstSimplify.diff fn eq_true(x: bool) -> u32 { diff --git a/tests/mir-opt/instsimplify/casts.rs b/tests/mir-opt/instsimplify/casts.rs index 86f9b34ea047..adcf325e3f5c 100644 --- a/tests/mir-opt/instsimplify/casts.rs +++ b/tests/mir-opt/instsimplify/casts.rs @@ -1,5 +1,5 @@ -// unit-test: InstSimplify -// compile-flags: -Zinline-mir +//@ unit-test: InstSimplify +//@ compile-flags: -Zinline-mir #![crate_type = "lib"] #[inline(always)] diff --git a/tests/mir-opt/instsimplify/combine_array_len.rs b/tests/mir-opt/instsimplify/combine_array_len.rs index 3b6795bc9430..4b4054a7a2d6 100644 --- a/tests/mir-opt/instsimplify/combine_array_len.rs +++ b/tests/mir-opt/instsimplify/combine_array_len.rs @@ -1,5 +1,5 @@ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -// unit-test: InstSimplify +//@ unit-test: InstSimplify // EMIT_MIR combine_array_len.norm2.InstSimplify.diff fn norm2(x: [f32; 2]) -> f32 { diff --git a/tests/mir-opt/instsimplify/combine_clone_of_primitives.rs b/tests/mir-opt/instsimplify/combine_clone_of_primitives.rs index 2adbe778d232..d0c85595dbcf 100644 --- a/tests/mir-opt/instsimplify/combine_clone_of_primitives.rs +++ b/tests/mir-opt/instsimplify/combine_clone_of_primitives.rs @@ -1,4 +1,4 @@ -// unit-test: InstSimplify +//@ unit-test: InstSimplify // EMIT_MIR_FOR_EACH_PANIC_STRATEGY // EMIT_MIR combine_clone_of_primitives.{impl#0}-clone.InstSimplify.diff diff --git a/tests/mir-opt/instsimplify/combine_transmutes.rs b/tests/mir-opt/instsimplify/combine_transmutes.rs index b8e15da905bd..7f45ebf2c863 100644 --- a/tests/mir-opt/instsimplify/combine_transmutes.rs +++ b/tests/mir-opt/instsimplify/combine_transmutes.rs @@ -1,5 +1,5 @@ -// unit-test: InstSimplify -// compile-flags: -C panic=abort +//@ unit-test: InstSimplify +//@ compile-flags: -C panic=abort #![crate_type = "lib"] #![feature(core_intrinsics)] diff --git a/tests/mir-opt/instsimplify/duplicate_switch_targets.rs b/tests/mir-opt/instsimplify/duplicate_switch_targets.rs index e40bc7edaac7..fd09d632a4f0 100644 --- a/tests/mir-opt/instsimplify/duplicate_switch_targets.rs +++ b/tests/mir-opt/instsimplify/duplicate_switch_targets.rs @@ -1,4 +1,4 @@ -// unit-test: InstSimplify +//@ unit-test: InstSimplify #![feature(custom_mir, core_intrinsics)] #![crate_type = "lib"] diff --git a/tests/mir-opt/instsimplify/intrinsic_asserts.rs b/tests/mir-opt/instsimplify/intrinsic_asserts.rs index 43998b2dbf02..c14b1ac5a218 100644 --- a/tests/mir-opt/instsimplify/intrinsic_asserts.rs +++ b/tests/mir-opt/instsimplify/intrinsic_asserts.rs @@ -1,4 +1,4 @@ -// unit-test: InstSimplify +//@ unit-test: InstSimplify #![crate_type = "lib"] #![feature(core_intrinsics)] diff --git a/tests/mir-opt/issue_101973.rs b/tests/mir-opt/issue_101973.rs index 83a4dfb20b52..c40eaa1f2a9b 100644 --- a/tests/mir-opt/issue_101973.rs +++ b/tests/mir-opt/issue_101973.rs @@ -1,6 +1,6 @@ // skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -// compile-flags: -O -C debug-assertions=on +//@ compile-flags: -O -C debug-assertions=on // This needs inlining followed by GVN to reproduce, so we cannot use "unit-test". #[inline] diff --git a/tests/mir-opt/issue_72181.rs b/tests/mir-opt/issue_72181.rs index 226709bab2fe..3748c2af83d2 100644 --- a/tests/mir-opt/issue_72181.rs +++ b/tests/mir-opt/issue_72181.rs @@ -1,5 +1,5 @@ // skip-filecheck -// compile-flags: -Z mir-opt-level=1 +//@ compile-flags: -Z mir-opt-level=1 // Regression test for #72181, this ICE requires `-Z mir-opt-level=1` flags. use std::mem; diff --git a/tests/mir-opt/issue_72181_1.rs b/tests/mir-opt/issue_72181_1.rs index f9ee33ef991d..32e946559d77 100644 --- a/tests/mir-opt/issue_72181_1.rs +++ b/tests/mir-opt/issue_72181_1.rs @@ -1,5 +1,5 @@ // skip-filecheck -// compile-flags: -Z mir-opt-level=1 +//@ compile-flags: -Z mir-opt-level=1 // Regression test for #72181, this ICE requires `-Z mir-opt-level=1` flags. #![feature(never_type)] diff --git a/tests/mir-opt/issue_76432.rs b/tests/mir-opt/issue_76432.rs index f0f12c535c5b..be5ccbd49e24 100644 --- a/tests/mir-opt/issue_76432.rs +++ b/tests/mir-opt/issue_76432.rs @@ -1,6 +1,6 @@ // skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -// compile-flags: -Zmir-enable-passes=-NormalizeArrayLen +//@ compile-flags: -Zmir-enable-passes=-NormalizeArrayLen // Check that we do not insert StorageDead at each target if StorageDead was never seen // EMIT_MIR issue_76432.test.SimplifyComparisonIntegral.diff diff --git a/tests/mir-opt/issue_78192.rs b/tests/mir-opt/issue_78192.rs index b08c3615e8b1..857b1dec951e 100644 --- a/tests/mir-opt/issue_78192.rs +++ b/tests/mir-opt/issue_78192.rs @@ -1,5 +1,5 @@ // skip-filecheck -// compile-flags: -Zmir-opt-level=1 -Zinline-mir +//@ compile-flags: -Zmir-opt-level=1 -Zinline-mir pub fn f(a: &T) -> *const T { let b: &*const T = &(a as *const T); *b diff --git a/tests/mir-opt/issue_91633.rs b/tests/mir-opt/issue_91633.rs index 047a0cd9bdbd..f7d59f5adfb6 100644 --- a/tests/mir-opt/issue_91633.rs +++ b/tests/mir-opt/issue_91633.rs @@ -1,5 +1,5 @@ // skip-filecheck -// compile-flags: -Z mir-opt-level=0 +//@ compile-flags: -Z mir-opt-level=0 // EMIT_MIR issue_91633.hey.built.after.mir fn hey (it: &[T]) where diff --git a/tests/mir-opt/issues/issue_59352.rs b/tests/mir-opt/issues/issue_59352.rs index 1cbeaec28bb2..5c06b7e56f71 100644 --- a/tests/mir-opt/issues/issue_59352.rs +++ b/tests/mir-opt/issues/issue_59352.rs @@ -9,7 +9,7 @@ // removed. // EMIT_MIR issue_59352.num_to_digit.PreCodegen.after.mir -// compile-flags: -Z mir-opt-level=3 -Z span_free_formats +//@ compile-flags: -Z mir-opt-level=3 -Z span_free_formats pub fn num_to_digit(num: char) -> u32 { // CHECK-NOT: panic diff --git a/tests/mir-opt/issues/issue_75439.rs b/tests/mir-opt/issues/issue_75439.rs index 0ab496e474d8..8c710a33aa8e 100644 --- a/tests/mir-opt/issues/issue_75439.rs +++ b/tests/mir-opt/issues/issue_75439.rs @@ -1,6 +1,6 @@ // skip-filecheck // EMIT_MIR issue_75439.foo.MatchBranchSimplification.diff -// ignore-endian-big +//@ ignore-endian-big use std::mem::transmute; diff --git a/tests/mir-opt/jump_threading.rs b/tests/mir-opt/jump_threading.rs index 512aebd857a6..eedb26ad41a5 100644 --- a/tests/mir-opt/jump_threading.rs +++ b/tests/mir-opt/jump_threading.rs @@ -1,5 +1,5 @@ -// unit-test: JumpThreading -// compile-flags: -Zmir-enable-passes=+Inline +//@ unit-test: JumpThreading +//@ compile-flags: -Zmir-enable-passes=+Inline // EMIT_MIR_FOR_EACH_PANIC_STRATEGY #![feature(control_flow_enum)] diff --git a/tests/mir-opt/loop_test.rs b/tests/mir-opt/loop_test.rs index 81a0d9df0a0a..bc9b65961070 100644 --- a/tests/mir-opt/loop_test.rs +++ b/tests/mir-opt/loop_test.rs @@ -1,5 +1,5 @@ // skip-filecheck -// compile-flags: -Z identify_regions +//@ compile-flags: -Z identify_regions // Tests to make sure we correctly generate falseUnwind edges in loops diff --git a/tests/mir-opt/lower_array_len.rs b/tests/mir-opt/lower_array_len.rs index effd83b6af03..7fcea75aaaf4 100644 --- a/tests/mir-opt/lower_array_len.rs +++ b/tests/mir-opt/lower_array_len.rs @@ -1,6 +1,6 @@ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -// unit-test: NormalizeArrayLen -// compile-flags: -Zmir-enable-passes=+LowerSliceLenCalls +//@ unit-test: NormalizeArrayLen +//@ compile-flags: -Zmir-enable-passes=+LowerSliceLenCalls // EMIT_MIR lower_array_len.array_bound.NormalizeArrayLen.diff pub fn array_bound(index: usize, slice: &[u8; N]) -> u8 { diff --git a/tests/mir-opt/lower_intrinsics.rs b/tests/mir-opt/lower_intrinsics.rs index cba2bc18d867..278ddfce1c33 100644 --- a/tests/mir-opt/lower_intrinsics.rs +++ b/tests/mir-opt/lower_intrinsics.rs @@ -1,4 +1,4 @@ -// unit-test: LowerIntrinsics +//@ unit-test: LowerIntrinsics // EMIT_MIR_FOR_EACH_PANIC_STRATEGY #![feature(core_intrinsics, intrinsics, rustc_attrs)] diff --git a/tests/mir-opt/lower_slice_len.rs b/tests/mir-opt/lower_slice_len.rs index 7b967a16588c..38d5e984cee7 100644 --- a/tests/mir-opt/lower_slice_len.rs +++ b/tests/mir-opt/lower_slice_len.rs @@ -1,4 +1,4 @@ -// unit-test: LowerSliceLenCalls +//@ unit-test: LowerSliceLenCalls // EMIT_MIR_FOR_EACH_PANIC_STRATEGY // EMIT_MIR lower_slice_len.bound.LowerSliceLenCalls.diff diff --git a/tests/mir-opt/matches_reduce_branches.rs b/tests/mir-opt/matches_reduce_branches.rs index 13db79734143..4bf14e5a7bd0 100644 --- a/tests/mir-opt/matches_reduce_branches.rs +++ b/tests/mir-opt/matches_reduce_branches.rs @@ -1,5 +1,5 @@ // skip-filecheck -// unit-test: MatchBranchSimplification +//@ unit-test: MatchBranchSimplification // EMIT_MIR matches_reduce_branches.foo.MatchBranchSimplification.diff diff --git a/tests/mir-opt/matches_u8.rs b/tests/mir-opt/matches_u8.rs index 47c4ffee0246..e855c913226a 100644 --- a/tests/mir-opt/matches_u8.rs +++ b/tests/mir-opt/matches_u8.rs @@ -1,5 +1,5 @@ // skip-filecheck -// unit-test: MatchBranchSimplification +//@ unit-test: MatchBranchSimplification // EMIT_MIR matches_u8.exhaustive_match.MatchBranchSimplification.diff diff --git a/tests/mir-opt/multiple_return_terminators.rs b/tests/mir-opt/multiple_return_terminators.rs index f33243ecf730..8d83082a829e 100644 --- a/tests/mir-opt/multiple_return_terminators.rs +++ b/tests/mir-opt/multiple_return_terminators.rs @@ -1,5 +1,5 @@ // skip-filecheck -// compile-flags: -Z mir-opt-level=4 +//@ compile-flags: -Z mir-opt-level=4 // EMIT_MIR multiple_return_terminators.test.MultipleReturnTerminators.diff fn test(x: bool) { diff --git a/tests/mir-opt/nll/named_lifetimes_basic.rs b/tests/mir-opt/nll/named_lifetimes_basic.rs index bb22ce0ed955..cc8385370038 100644 --- a/tests/mir-opt/nll/named_lifetimes_basic.rs +++ b/tests/mir-opt/nll/named_lifetimes_basic.rs @@ -4,7 +4,7 @@ // suitable variables and that we setup the outlives relationship // between R0 and R1 properly. -// compile-flags: -Zverbose-internals +//@ compile-flags: -Zverbose-internals // ^^^^^^^^^^^^^^^^^^^ force compiler to dump more region information #![allow(warnings)] diff --git a/tests/mir-opt/nll/region_subtyping_basic.rs b/tests/mir-opt/nll/region_subtyping_basic.rs index 940f8d173444..ee74f7af2eb7 100644 --- a/tests/mir-opt/nll/region_subtyping_basic.rs +++ b/tests/mir-opt/nll/region_subtyping_basic.rs @@ -3,7 +3,7 @@ // in the type of `p` includes the points after `&v[0]` up to (but not // including) the call to `use_x`. The `else` branch is not included. -// compile-flags:-Zverbose-internals +//@ compile-flags:-Zverbose-internals // ^^^^^^^^^^^^^^^^^^^ force compiler to dump more region information #![allow(warnings)] diff --git a/tests/mir-opt/nrvo_miscompile_111005.rs b/tests/mir-opt/nrvo_miscompile_111005.rs index aff037ae4f29..3087c98d0528 100644 --- a/tests/mir-opt/nrvo_miscompile_111005.rs +++ b/tests/mir-opt/nrvo_miscompile_111005.rs @@ -1,7 +1,7 @@ // skip-filecheck // This is a miscompilation, #111005 to track -// unit-test: RenameReturnPlace +//@ unit-test: RenameReturnPlace #![feature(custom_mir, core_intrinsics)] extern crate core; diff --git a/tests/mir-opt/nrvo_simple.rs b/tests/mir-opt/nrvo_simple.rs index 5b403c560a7e..adb787a09fb6 100644 --- a/tests/mir-opt/nrvo_simple.rs +++ b/tests/mir-opt/nrvo_simple.rs @@ -1,6 +1,6 @@ // skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -// unit-test: RenameReturnPlace +//@ unit-test: RenameReturnPlace // EMIT_MIR nrvo_simple.nrvo.RenameReturnPlace.diff fn nrvo(init: fn(&mut [u8; 1024])) -> [u8; 1024] { diff --git a/tests/mir-opt/pre-codegen/chained_comparison.rs b/tests/mir-opt/pre-codegen/chained_comparison.rs index d1d400af22f4..4869f1e01a02 100644 --- a/tests/mir-opt/pre-codegen/chained_comparison.rs +++ b/tests/mir-opt/pre-codegen/chained_comparison.rs @@ -1,5 +1,5 @@ // skip-filecheck -// compile-flags: -O -Zmir-opt-level=2 -Cdebuginfo=2 +//@ compile-flags: -O -Zmir-opt-level=2 -Cdebuginfo=2 #![crate_type = "lib"] diff --git a/tests/mir-opt/pre-codegen/checked_ops.rs b/tests/mir-opt/pre-codegen/checked_ops.rs index d386219f4a6b..d36502d35478 100644 --- a/tests/mir-opt/pre-codegen/checked_ops.rs +++ b/tests/mir-opt/pre-codegen/checked_ops.rs @@ -1,7 +1,7 @@ // skip-filecheck -// compile-flags: -O -Zmir-opt-level=2 -Cdebuginfo=2 -// needs-unwind -// only-x86_64 +//@ compile-flags: -O -Zmir-opt-level=2 -Cdebuginfo=2 +//@ needs-unwind +//@ only-x86_64 #![crate_type = "lib"] #![feature(step_trait)] diff --git a/tests/mir-opt/pre-codegen/duplicate_switch_targets.rs b/tests/mir-opt/pre-codegen/duplicate_switch_targets.rs index b1a00d293725..67540676f4a5 100644 --- a/tests/mir-opt/pre-codegen/duplicate_switch_targets.rs +++ b/tests/mir-opt/pre-codegen/duplicate_switch_targets.rs @@ -1,6 +1,6 @@ // skip-filecheck -// compile-flags: -O -Zmir-opt-level=2 -Cdebuginfo=0 -// ignore-debug: standard library debug assertions add a panic that breaks this optimization +//@ compile-flags: -O -Zmir-opt-level=2 -Cdebuginfo=0 +//@ ignore-debug: standard library debug assertions add a panic that breaks this optimization #![crate_type = "lib"] diff --git a/tests/mir-opt/pre-codegen/intrinsics.rs b/tests/mir-opt/pre-codegen/intrinsics.rs index 565bd89e5716..ed7320cd3c4d 100644 --- a/tests/mir-opt/pre-codegen/intrinsics.rs +++ b/tests/mir-opt/pre-codegen/intrinsics.rs @@ -1,10 +1,10 @@ // skip-filecheck -// compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2 -// only-64bit +//@ compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2 +//@ only-64bit // Checks that we do not have any branches in the MIR for the two tested functions. -// compile-flags: -Cpanic=abort +//@ compile-flags: -Cpanic=abort #![feature(core_intrinsics)] #![crate_type = "lib"] diff --git a/tests/mir-opt/pre-codegen/loops.rs b/tests/mir-opt/pre-codegen/loops.rs index 9412c3f234e3..2d179abc9f31 100644 --- a/tests/mir-opt/pre-codegen/loops.rs +++ b/tests/mir-opt/pre-codegen/loops.rs @@ -1,7 +1,7 @@ // skip-filecheck -// compile-flags: -O -Zmir-opt-level=2 -g -// needs-unwind -// only-64bit +//@ compile-flags: -O -Zmir-opt-level=2 -g +//@ needs-unwind +//@ only-64bit #![crate_type = "lib"] diff --git a/tests/mir-opt/pre-codegen/mem_replace.rs b/tests/mir-opt/pre-codegen/mem_replace.rs index 551afea3ba5a..535c1062669a 100644 --- a/tests/mir-opt/pre-codegen/mem_replace.rs +++ b/tests/mir-opt/pre-codegen/mem_replace.rs @@ -1,7 +1,7 @@ // skip-filecheck -// compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2 -Zinline-mir -// only-64bit -// ignore-debug the standard library debug assertions leak into this test +//@ compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2 -Zinline-mir +//@ only-64bit +//@ ignore-debug the standard library debug assertions leak into this test // EMIT_MIR_FOR_EACH_PANIC_STRATEGY #![crate_type = "lib"] diff --git a/tests/mir-opt/pre-codegen/optimizes_into_variable.rs b/tests/mir-opt/pre-codegen/optimizes_into_variable.rs index fb634ca85ef0..7a1fb1e76c03 100644 --- a/tests/mir-opt/pre-codegen/optimizes_into_variable.rs +++ b/tests/mir-opt/pre-codegen/optimizes_into_variable.rs @@ -1,6 +1,6 @@ // skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -// compile-flags: -C overflow-checks=on +//@ compile-flags: -C overflow-checks=on struct Point { x: u32, diff --git a/tests/mir-opt/pre-codegen/range_iter.rs b/tests/mir-opt/pre-codegen/range_iter.rs index 80b1a5b2fa5e..fe7d0e67f7a1 100644 --- a/tests/mir-opt/pre-codegen/range_iter.rs +++ b/tests/mir-opt/pre-codegen/range_iter.rs @@ -1,6 +1,6 @@ // skip-filecheck -// compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2 -// only-64bit +//@ compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2 +//@ only-64bit // EMIT_MIR_FOR_EACH_PANIC_STRATEGY #![crate_type = "lib"] diff --git a/tests/mir-opt/pre-codegen/simple_option_map.rs b/tests/mir-opt/pre-codegen/simple_option_map.rs index 35f9ab3e154c..c563f6af2a53 100644 --- a/tests/mir-opt/pre-codegen/simple_option_map.rs +++ b/tests/mir-opt/pre-codegen/simple_option_map.rs @@ -1,6 +1,6 @@ // skip-filecheck -// compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2 -// only-64bit +//@ compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2 +//@ only-64bit #[inline(always)] fn map(slf: Option, f: F) -> Option diff --git a/tests/mir-opt/pre-codegen/slice_filter.rs b/tests/mir-opt/pre-codegen/slice_filter.rs index 483e5876615f..45686f0bf880 100644 --- a/tests/mir-opt/pre-codegen/slice_filter.rs +++ b/tests/mir-opt/pre-codegen/slice_filter.rs @@ -1,6 +1,6 @@ // skip-filecheck -// compile-flags: -O -Zmir-opt-level=2 -Cdebuginfo=2 -// ignore-debug: standard library debug assertions add a panic that breaks this optimization +//@ compile-flags: -O -Zmir-opt-level=2 -Cdebuginfo=2 +//@ ignore-debug: standard library debug assertions add a panic that breaks this optimization #![crate_type = "lib"] diff --git a/tests/mir-opt/pre-codegen/slice_index.rs b/tests/mir-opt/pre-codegen/slice_index.rs index 5225fc5c6e18..80bbffbd097d 100644 --- a/tests/mir-opt/pre-codegen/slice_index.rs +++ b/tests/mir-opt/pre-codegen/slice_index.rs @@ -1,7 +1,7 @@ // skip-filecheck -// compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2 -// only-64bit -// ignore-debug the standard library debug assertions leak into this test +//@ compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2 +//@ only-64bit +//@ ignore-debug the standard library debug assertions leak into this test // EMIT_MIR_FOR_EACH_PANIC_STRATEGY #![crate_type = "lib"] diff --git a/tests/mir-opt/pre-codegen/slice_iter.rs b/tests/mir-opt/pre-codegen/slice_iter.rs index 10a5c3070d89..0269eb39ddf0 100644 --- a/tests/mir-opt/pre-codegen/slice_iter.rs +++ b/tests/mir-opt/pre-codegen/slice_iter.rs @@ -1,7 +1,7 @@ // skip-filecheck -// compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2 -// only-64bit -// ignore-debug the standard library debug assertions leak into this test +//@ compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2 +//@ only-64bit +//@ ignore-debug the standard library debug assertions leak into this test // EMIT_MIR_FOR_EACH_PANIC_STRATEGY #![crate_type = "lib"] diff --git a/tests/mir-opt/pre-codegen/spans.rs b/tests/mir-opt/pre-codegen/spans.rs index aa36648ce395..4d3dc7ec3e59 100644 --- a/tests/mir-opt/pre-codegen/spans.rs +++ b/tests/mir-opt/pre-codegen/spans.rs @@ -2,7 +2,7 @@ // Test that the comments we emit in MIR opts are accurate. // // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -// compile-flags: -Zmir-include-spans +//@ compile-flags: -Zmir-include-spans #![crate_type = "lib"] diff --git a/tests/mir-opt/pre-codegen/try_identity.rs b/tests/mir-opt/pre-codegen/try_identity.rs index b6e4eaad7e1d..9da02d65e159 100644 --- a/tests/mir-opt/pre-codegen/try_identity.rs +++ b/tests/mir-opt/pre-codegen/try_identity.rs @@ -1,6 +1,6 @@ // skip-filecheck -// compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2 -// only-64bit +//@ compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2 +//@ only-64bit // Track the status of MIR optimizations simplifying `Ok(res?)` for both the old and new desugarings // of that syntax. diff --git a/tests/mir-opt/reference_prop.rs b/tests/mir-opt/reference_prop.rs index b71ad90abb19..70587dff0b54 100644 --- a/tests/mir-opt/reference_prop.rs +++ b/tests/mir-opt/reference_prop.rs @@ -1,6 +1,6 @@ -// compile-flags: -Zlint-mir=no -// unit-test: ReferencePropagation -// needs-unwind +//@ compile-flags: -Zlint-mir=no +//@ unit-test: ReferencePropagation +//@ needs-unwind #![feature(raw_ref_op)] #![feature(core_intrinsics, custom_mir)] diff --git a/tests/mir-opt/remove_storage_markers.rs b/tests/mir-opt/remove_storage_markers.rs index 27661ab32541..c53c38750452 100644 --- a/tests/mir-opt/remove_storage_markers.rs +++ b/tests/mir-opt/remove_storage_markers.rs @@ -1,9 +1,9 @@ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -// unit-test: RemoveStorageMarkers +//@ unit-test: RemoveStorageMarkers // Checks that storage markers are removed at opt-level=0. // -// compile-flags: -C opt-level=0 -Coverflow-checks=off +//@ compile-flags: -C opt-level=0 -Coverflow-checks=off // EMIT_MIR remove_storage_markers.main.RemoveStorageMarkers.diff fn main() { diff --git a/tests/mir-opt/retag.rs b/tests/mir-opt/retag.rs index 554b8ece90f2..0f2659ebfe85 100644 --- a/tests/mir-opt/retag.rs +++ b/tests/mir-opt/retag.rs @@ -1,8 +1,8 @@ // skip-filecheck -// unit-test: AddRetag +//@ unit-test: AddRetag // EMIT_MIR_FOR_EACH_PANIC_STRATEGY // ignore-tidy-linelength -// compile-flags: -Z mir-emit-retag -Z mir-opt-level=0 -Z span_free_formats +//@ compile-flags: -Z mir-emit-retag -Z mir-opt-level=0 -Z span_free_formats #![allow(unused)] diff --git a/tests/mir-opt/separate_const_switch.rs b/tests/mir-opt/separate_const_switch.rs index bad61d97475a..5e8371b3e490 100644 --- a/tests/mir-opt/separate_const_switch.rs +++ b/tests/mir-opt/separate_const_switch.rs @@ -2,7 +2,7 @@ #![feature(control_flow_enum)] #![feature(try_trait_v2)] -// compile-flags: -Zunsound-mir-opts +//@ compile-flags: -Zunsound-mir-opts use std::ops::ControlFlow; diff --git a/tests/mir-opt/set_no_discriminant.rs b/tests/mir-opt/set_no_discriminant.rs index 8ffb9a2910ab..995bd11a1a92 100644 --- a/tests/mir-opt/set_no_discriminant.rs +++ b/tests/mir-opt/set_no_discriminant.rs @@ -1,6 +1,6 @@ // `SetDiscriminant` does not actually write anything if the chosen variant is the untagged variant // of a niche encoding. Verify that we do not thread over this case. -// unit-test: JumpThreading +//@ unit-test: JumpThreading #![feature(custom_mir)] #![feature(core_intrinsics)] diff --git a/tests/mir-opt/simplify_arm.rs b/tests/mir-opt/simplify_arm.rs index e933cb987d87..5d9c31121dda 100644 --- a/tests/mir-opt/simplify_arm.rs +++ b/tests/mir-opt/simplify_arm.rs @@ -1,5 +1,5 @@ // skip-filecheck -// compile-flags: -Z mir-opt-level=3 -Zunsound-mir-opts +//@ compile-flags: -Z mir-opt-level=3 -Zunsound-mir-opts // EMIT_MIR simplify_arm.id.SimplifyArmIdentity.diff // EMIT_MIR simplify_arm.id.SimplifyBranchSame.diff // EMIT_MIR simplify_arm.id_result.SimplifyArmIdentity.diff @@ -7,7 +7,7 @@ // EMIT_MIR simplify_arm.id_try.SimplifyArmIdentity.diff // EMIT_MIR simplify_arm.id_try.SimplifyBranchSame.diff -// ignore-test This pass is broken since deaggregation changed +//@ ignore-test This pass is broken since deaggregation changed fn id(o: Option) -> Option { match o { diff --git a/tests/mir-opt/simplify_arm_identity.rs b/tests/mir-opt/simplify_arm_identity.rs index 1b546c3938ea..79395b312ace 100644 --- a/tests/mir-opt/simplify_arm_identity.rs +++ b/tests/mir-opt/simplify_arm_identity.rs @@ -2,10 +2,10 @@ // Checks that `SimplifyArmIdentity` is not applied if enums have incompatible layouts. // Regression test for issue #66856. // -// compile-flags: -Zmir-opt-level=3 +//@ compile-flags: -Zmir-opt-level=3 // EMIT_MIR_FOR_EACH_BIT_WIDTH -// ignore-test This pass is broken since deaggregation changed +//@ ignore-test This pass is broken since deaggregation changed enum Src { Foo(u8), diff --git a/tests/mir-opt/simplify_cfg.rs b/tests/mir-opt/simplify_cfg.rs index a87aaca544ce..8dea0e50a61b 100644 --- a/tests/mir-opt/simplify_cfg.rs +++ b/tests/mir-opt/simplify_cfg.rs @@ -1,7 +1,7 @@ // skip-filecheck // Test that the goto chain starting from bb0 is collapsed. -// compile-flags: -Cpanic=abort -// no-prefer-dynamic +//@ compile-flags: -Cpanic=abort +//@ no-prefer-dynamic // EMIT_MIR simplify_cfg.main.SimplifyCfg-initial.diff // EMIT_MIR simplify_cfg.main.SimplifyCfg-early-opt.diff diff --git a/tests/mir-opt/simplify_duplicate_unreachable_blocks.rs b/tests/mir-opt/simplify_duplicate_unreachable_blocks.rs index 5c4277898cd0..d94e61118556 100644 --- a/tests/mir-opt/simplify_duplicate_unreachable_blocks.rs +++ b/tests/mir-opt/simplify_duplicate_unreachable_blocks.rs @@ -4,7 +4,7 @@ use std::intrinsics::mir::*; -// unit-test: SimplifyCfg-after-uninhabited-enum-branching +//@ unit-test: SimplifyCfg-after-uninhabited-enum-branching // EMIT_MIR simplify_duplicate_unreachable_blocks.assert_nonzero_nonmax.SimplifyCfg-after-uninhabited-enum-branching.diff #[custom_mir(dialect = "runtime", phase = "post-cleanup")] diff --git a/tests/mir-opt/simplify_locals.rs b/tests/mir-opt/simplify_locals.rs index d4052e521dea..f95e9185f448 100644 --- a/tests/mir-opt/simplify_locals.rs +++ b/tests/mir-opt/simplify_locals.rs @@ -1,5 +1,5 @@ // skip-filecheck -// unit-test: SimplifyLocals-before-const-prop +//@ unit-test: SimplifyLocals-before-const-prop #![feature(thread_local)] diff --git a/tests/mir-opt/simplify_locals_fixedpoint.rs b/tests/mir-opt/simplify_locals_fixedpoint.rs index b0c6e2d8eb59..6947d31dc3e1 100644 --- a/tests/mir-opt/simplify_locals_fixedpoint.rs +++ b/tests/mir-opt/simplify_locals_fixedpoint.rs @@ -1,6 +1,6 @@ // skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -// compile-flags: -Zmir-opt-level=1 +//@ compile-flags: -Zmir-opt-level=1 fn foo() { if let (Some(a), None) = (Option::::None, Option::::None) { diff --git a/tests/mir-opt/simplify_locals_removes_unused_consts.rs b/tests/mir-opt/simplify_locals_removes_unused_consts.rs index 42879254d714..3a461647e362 100644 --- a/tests/mir-opt/simplify_locals_removes_unused_consts.rs +++ b/tests/mir-opt/simplify_locals_removes_unused_consts.rs @@ -1,7 +1,7 @@ // skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -// unit-test: SimplifyLocals-before-const-prop -// compile-flags: -C overflow-checks=no +//@ unit-test: SimplifyLocals-before-const-prop +//@ compile-flags: -C overflow-checks=no fn use_zst(_: ((), ())) {} diff --git a/tests/mir-opt/simplify_locals_removes_unused_discriminant_reads.rs b/tests/mir-opt/simplify_locals_removes_unused_discriminant_reads.rs index 615b972209c3..52afb4f2c527 100644 --- a/tests/mir-opt/simplify_locals_removes_unused_discriminant_reads.rs +++ b/tests/mir-opt/simplify_locals_removes_unused_discriminant_reads.rs @@ -1,5 +1,5 @@ // skip-filecheck -// unit-test: SimplifyLocals-before-const-prop +//@ unit-test: SimplifyLocals-before-const-prop fn map(x: Option>) -> Option> { match x { diff --git a/tests/mir-opt/simplify_try_if_let.rs b/tests/mir-opt/simplify_try_if_let.rs index 3a59d78500ce..98df9a54abb3 100644 --- a/tests/mir-opt/simplify_try_if_let.rs +++ b/tests/mir-opt/simplify_try_if_let.rs @@ -1,6 +1,6 @@ // skip-filecheck -// compile-flags: -Zmir-opt-level=1 -Zunsound-mir-opts -// ignore-test +//@ compile-flags: -Zmir-opt-level=1 -Zunsound-mir-opts +//@ ignore-test // FIXME: the pass is unsound and causes ICEs in the MIR validator // EMIT_MIR simplify_try_if_let.{impl#0}-append.SimplifyArmIdentity.diff diff --git a/tests/mir-opt/slice_drop_shim.rs b/tests/mir-opt/slice_drop_shim.rs index 037e048b3b79..c2f4c82ecc86 100644 --- a/tests/mir-opt/slice_drop_shim.rs +++ b/tests/mir-opt/slice_drop_shim.rs @@ -1,5 +1,5 @@ // skip-filecheck -// compile-flags: -Zmir-opt-level=0 -Clink-dead-code +//@ compile-flags: -Zmir-opt-level=0 -Clink-dead-code // mir-opt tests are always built as rlibs so that they seamlessly cross-compile, // so this test only produces MIR for the drop_in_place we're looking for // if we use -Clink-dead-code. diff --git a/tests/mir-opt/sroa/lifetimes.rs b/tests/mir-opt/sroa/lifetimes.rs index ea04fac15710..3f5c99404d86 100644 --- a/tests/mir-opt/sroa/lifetimes.rs +++ b/tests/mir-opt/sroa/lifetimes.rs @@ -1,6 +1,6 @@ -// unit-test: ScalarReplacementOfAggregates -// compile-flags: -Cpanic=abort -// no-prefer-dynamic +//@ unit-test: ScalarReplacementOfAggregates +//@ compile-flags: -Cpanic=abort +//@ no-prefer-dynamic trait Err { type Err; diff --git a/tests/mir-opt/sroa/structs.rs b/tests/mir-opt/sroa/structs.rs index 5ea3795b86e2..cbe4b9895303 100644 --- a/tests/mir-opt/sroa/structs.rs +++ b/tests/mir-opt/sroa/structs.rs @@ -1,6 +1,6 @@ -// unit-test: ScalarReplacementOfAggregates -// compile-flags: -Cpanic=abort -// no-prefer-dynamic +//@ unit-test: ScalarReplacementOfAggregates +//@ compile-flags: -Cpanic=abort +//@ no-prefer-dynamic struct Tag(usize); diff --git a/tests/mir-opt/tls_access.rs b/tests/mir-opt/tls_access.rs index 450dd9b47302..3dfc85def99e 100644 --- a/tests/mir-opt/tls_access.rs +++ b/tests/mir-opt/tls_access.rs @@ -1,6 +1,6 @@ // skip-filecheck // EMIT_MIR tls_access.main.PreCodegen.after.mir -// compile-flags: -Zmir-opt-level=0 +//@ compile-flags: -Zmir-opt-level=0 #![feature(thread_local)] diff --git a/tests/mir-opt/uninhabited_enum_branching.rs b/tests/mir-opt/uninhabited_enum_branching.rs index 65552fb058a4..08eca57afc63 100644 --- a/tests/mir-opt/uninhabited_enum_branching.rs +++ b/tests/mir-opt/uninhabited_enum_branching.rs @@ -1,4 +1,4 @@ -// unit-test: UninhabitedEnumBranching +//@ unit-test: UninhabitedEnumBranching enum Empty {} // test matching an enum with uninhabited variants diff --git a/tests/mir-opt/unreachable.rs b/tests/mir-opt/unreachable.rs index 5b96681d9df5..b07b8230faf3 100644 --- a/tests/mir-opt/unreachable.rs +++ b/tests/mir-opt/unreachable.rs @@ -1,4 +1,4 @@ -// unit-test: UnreachablePropagation +//@ unit-test: UnreachablePropagation // EMIT_MIR_FOR_EACH_PANIC_STRATEGY enum Empty {} diff --git a/tests/mir-opt/unreachable_diverging.rs b/tests/mir-opt/unreachable_diverging.rs index b1df6f85262d..b7e0f6eff9bf 100644 --- a/tests/mir-opt/unreachable_diverging.rs +++ b/tests/mir-opt/unreachable_diverging.rs @@ -1,4 +1,4 @@ -// unit-test: UnreachablePropagation +//@ unit-test: UnreachablePropagation // EMIT_MIR_FOR_EACH_PANIC_STRATEGY pub enum Empty {} diff --git a/tests/mir-opt/unusual_item_types.rs b/tests/mir-opt/unusual_item_types.rs index fa6ba515473b..788475431044 100644 --- a/tests/mir-opt/unusual_item_types.rs +++ b/tests/mir-opt/unusual_item_types.rs @@ -1,7 +1,7 @@ // skip-filecheck // Test that we don't ICE when trying to dump MIR for unusual item types and // that we don't create filenames containing `<` and `>` -// compile-flags: -Zmir-opt-level=0 +//@ compile-flags: -Zmir-opt-level=0 struct A; diff --git a/tests/pretty/asm.pp b/tests/pretty/asm.pp index 5eade2933b82..e6c9545f51ee 100644 --- a/tests/pretty/asm.pp +++ b/tests/pretty/asm.pp @@ -4,9 +4,9 @@ use ::std::prelude::rust_2015::*; #[macro_use] extern crate std; -// pretty-mode:expanded -// pp-exact:asm.pp -// only-x86_64 +//@ pretty-mode:expanded +//@ pp-exact:asm.pp +//@ only-x86_64 use std::arch::asm; diff --git a/tests/pretty/asm.rs b/tests/pretty/asm.rs index 1a3f972c8f2e..4b8257f0ae12 100644 --- a/tests/pretty/asm.rs +++ b/tests/pretty/asm.rs @@ -1,6 +1,6 @@ -// pretty-mode:expanded -// pp-exact:asm.pp -// only-x86_64 +//@ pretty-mode:expanded +//@ pp-exact:asm.pp +//@ only-x86_64 use std::arch::asm; diff --git a/tests/pretty/ast-stmt-expr-attr.rs b/tests/pretty/ast-stmt-expr-attr.rs index a958666e3eea..fd7272a1b1fd 100644 --- a/tests/pretty/ast-stmt-expr-attr.rs +++ b/tests/pretty/ast-stmt-expr-attr.rs @@ -1,4 +1,4 @@ -// pp-exact +//@ pp-exact fn main() {} diff --git a/tests/pretty/async.rs b/tests/pretty/async.rs index 573e79bffd7e..17bb9abd7201 100644 --- a/tests/pretty/async.rs +++ b/tests/pretty/async.rs @@ -1,6 +1,6 @@ -// pp-exact -// pretty-compare-only -// edition:2021 +//@ pp-exact +//@ pretty-compare-only +//@ edition:2021 async fn f() { let first = async { 1 }; diff --git a/tests/pretty/attr-derive.rs b/tests/pretty/attr-derive.rs index 0eb403c6bc84..79b6ea514463 100644 --- a/tests/pretty/attr-derive.rs +++ b/tests/pretty/attr-derive.rs @@ -1,5 +1,5 @@ -// aux-build:derive-foo.rs -// pp-exact +//@ aux-build:derive-foo.rs +//@ pp-exact // Testing that both the inner item and next outer item are // preserved, and that the first outer item parsed in main is not // accidentally carried over to each inner function diff --git a/tests/pretty/attr-fn-inner.rs b/tests/pretty/attr-fn-inner.rs index 6d9cb89f0229..67537eccb07b 100644 --- a/tests/pretty/attr-fn-inner.rs +++ b/tests/pretty/attr-fn-inner.rs @@ -2,7 +2,7 @@ // preserved, and that the first outer item parsed in main is not // accidentally carried over to each inner function -// pp-exact +//@ pp-exact #![feature(rustc_attrs)] diff --git a/tests/pretty/attr-literals.rs b/tests/pretty/attr-literals.rs index d132014420df..6e5d6f035925 100644 --- a/tests/pretty/attr-literals.rs +++ b/tests/pretty/attr-literals.rs @@ -1,6 +1,6 @@ // Tests literals in attributes. -// pp-exact +//@ pp-exact #![feature(rustc_attrs)] diff --git a/tests/pretty/attr-tokens-raw-ident.rs b/tests/pretty/attr-tokens-raw-ident.rs index 8486342b0879..ce0027f282eb 100644 --- a/tests/pretty/attr-tokens-raw-ident.rs +++ b/tests/pretty/attr-tokens-raw-ident.rs @@ -1,7 +1,7 @@ // Keywords in attribute paths are printed as raw idents, // but keywords in attribute arguments are not. -// pp-exact +//@ pp-exact #[rustfmt::r#final(final)] fn main() {} diff --git a/tests/pretty/auto-trait.rs b/tests/pretty/auto-trait.rs index c3c47cff5eda..80d952599402 100644 --- a/tests/pretty/auto-trait.rs +++ b/tests/pretty/auto-trait.rs @@ -1,6 +1,6 @@ #![feature(auto_traits)] -// pp-exact +//@ pp-exact auto trait MyTrait {} diff --git a/tests/pretty/auxiliary/derive-foo.rs b/tests/pretty/auxiliary/derive-foo.rs index 675a93b3dad7..dc682beafade 100644 --- a/tests/pretty/auxiliary/derive-foo.rs +++ b/tests/pretty/auxiliary/derive-foo.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/pretty/blank-lines.rs b/tests/pretty/blank-lines.rs index b9153d0482c8..89a95fcda2de 100644 --- a/tests/pretty/blank-lines.rs +++ b/tests/pretty/blank-lines.rs @@ -1,6 +1,6 @@ -// compile-flags: --crate-type=lib +//@ compile-flags: --crate-type=lib -// pp-exact +//@ pp-exact fn f() -> [isize; 3] { let picard = 0; diff --git a/tests/pretty/block-comment-multiple-asterisks.rs b/tests/pretty/block-comment-multiple-asterisks.rs index bb090b746367..537924f786bd 100644 --- a/tests/pretty/block-comment-multiple-asterisks.rs +++ b/tests/pretty/block-comment-multiple-asterisks.rs @@ -1,6 +1,6 @@ -// compile-flags: --crate-type=lib +//@ compile-flags: --crate-type=lib -// pp-exact +//@ pp-exact /*** More than two asterisks means that it isn't a doc comment. */ diff --git a/tests/pretty/block-comment-trailing-whitespace.rs b/tests/pretty/block-comment-trailing-whitespace.rs index 4d502f603d1d..aac062869bfa 100644 --- a/tests/pretty/block-comment-trailing-whitespace.rs +++ b/tests/pretty/block-comment-trailing-whitespace.rs @@ -1,6 +1,6 @@ -// compile-flags: --crate-type=lib +//@ compile-flags: --crate-type=lib -// pp-exact +//@ pp-exact fn f() { /* The next line should not be indented. diff --git a/tests/pretty/block-comment-trailing-whitespace2.rs b/tests/pretty/block-comment-trailing-whitespace2.rs index e53d51e34cef..59cb6c06abe7 100644 --- a/tests/pretty/block-comment-trailing-whitespace2.rs +++ b/tests/pretty/block-comment-trailing-whitespace2.rs @@ -1,6 +1,6 @@ -// compile-flags: --crate-type=lib +//@ compile-flags: --crate-type=lib -// pp-exact +//@ pp-exact fn f() {} /* The next line should not be indented. diff --git a/tests/pretty/block-comment-wchar.pp b/tests/pretty/block-comment-wchar.pp index 9d64fb4156ca..863fe686d7d4 100644 --- a/tests/pretty/block-comment-wchar.pp +++ b/tests/pretty/block-comment-wchar.pp @@ -3,7 +3,7 @@ // Test via: rustc -Zunpretty normal tests/pretty/block-comment-wchar.rs // ignore-tidy-cr // ignore-tidy-tab -// pp-exact:block-comment-wchar.pp +//@ pp-exact:block-comment-wchar.pp fn f() { fn nested() { /* diff --git a/tests/pretty/block-comment-wchar.rs b/tests/pretty/block-comment-wchar.rs index c042ea685900..bf58192cd9b7 100644 --- a/tests/pretty/block-comment-wchar.rs +++ b/tests/pretty/block-comment-wchar.rs @@ -3,7 +3,7 @@ // Test via: rustc -Zunpretty normal tests/pretty/block-comment-wchar.rs // ignore-tidy-cr // ignore-tidy-tab -// pp-exact:block-comment-wchar.pp +//@ pp-exact:block-comment-wchar.pp fn f() { fn nested() { /* diff --git a/tests/pretty/block-disambig.rs b/tests/pretty/block-disambig.rs index ac9b84a5d7e3..33e51f3c2f5f 100644 --- a/tests/pretty/block-disambig.rs +++ b/tests/pretty/block-disambig.rs @@ -1,4 +1,4 @@ -// compile-flags: --crate-type=lib +//@ compile-flags: --crate-type=lib // A bunch of tests for syntactic forms involving blocks that were // previously ambiguous (e.g., 'if true { } *val;' gets parsed as a diff --git a/tests/pretty/cast-lt.pp b/tests/pretty/cast-lt.pp index 61cd8f59712f..f6155c9d827b 100644 --- a/tests/pretty/cast-lt.pp +++ b/tests/pretty/cast-lt.pp @@ -4,9 +4,9 @@ use ::std::prelude::rust_2015::*; #[macro_use] extern crate std; -// pretty-compare-only -// pretty-mode:expanded -// pp-exact:cast-lt.pp +//@ pretty-compare-only +//@ pretty-mode:expanded +//@ pp-exact:cast-lt.pp macro_rules! negative { ($e:expr) => { $e < 0 } } diff --git a/tests/pretty/cast-lt.rs b/tests/pretty/cast-lt.rs index e14bdd1f3b3e..96fff450dcfd 100644 --- a/tests/pretty/cast-lt.rs +++ b/tests/pretty/cast-lt.rs @@ -1,6 +1,6 @@ -// pretty-compare-only -// pretty-mode:expanded -// pp-exact:cast-lt.pp +//@ pretty-compare-only +//@ pretty-mode:expanded +//@ pp-exact:cast-lt.pp macro_rules! negative { ($e:expr) => { $e < 0 } diff --git a/tests/pretty/closure-reform-pretty.rs b/tests/pretty/closure-reform-pretty.rs index 1eba1e6bdec3..b4d0be472c97 100644 --- a/tests/pretty/closure-reform-pretty.rs +++ b/tests/pretty/closure-reform-pretty.rs @@ -1,7 +1,7 @@ // Any copyright is dedicated to the Public Domain. // http://creativecommons.org/publicdomain/zero/1.0/ -// pp-exact +//@ pp-exact fn call_it(f: Box String>) {} diff --git a/tests/pretty/delegation.rs b/tests/pretty/delegation.rs index 6a46437f7d63..2d0123363c50 100644 --- a/tests/pretty/delegation.rs +++ b/tests/pretty/delegation.rs @@ -1,7 +1,7 @@ #![feature(fn_delegation)] //~^ WARN the feature `fn_delegation` is incomplete -// pp-exact +//@ pp-exact trait Trait { fn bar(&self, x: i32) -> i32 { x } diff --git a/tests/pretty/delimited-token-groups.rs b/tests/pretty/delimited-token-groups.rs index b24c35bf0813..8160b9f41e6c 100644 --- a/tests/pretty/delimited-token-groups.rs +++ b/tests/pretty/delimited-token-groups.rs @@ -1,4 +1,4 @@ -// pp-exact +//@ pp-exact #![feature(rustc_attrs)] diff --git a/tests/pretty/disamb-stmt-expr.rs b/tests/pretty/disamb-stmt-expr.rs index 734f9fa123ee..7420e5401f27 100644 --- a/tests/pretty/disamb-stmt-expr.rs +++ b/tests/pretty/disamb-stmt-expr.rs @@ -1,4 +1,4 @@ -// pp-exact +//@ pp-exact // Here we check that the parentheses around the body of `wsucc()` are // preserved. They are needed to disambiguate `{return n+1}; - 0` from diff --git a/tests/pretty/do1.rs b/tests/pretty/do1.rs index 233ccdb0098b..dfcbbf78bc99 100644 --- a/tests/pretty/do1.rs +++ b/tests/pretty/do1.rs @@ -1,4 +1,4 @@ -// pp-exact +//@ pp-exact fn f(f: F) where F: Fn(isize) { f(10) } diff --git a/tests/pretty/doc-comments.rs b/tests/pretty/doc-comments.rs index a49860daa6ad..66a270e4f921 100644 --- a/tests/pretty/doc-comments.rs +++ b/tests/pretty/doc-comments.rs @@ -1,6 +1,6 @@ -// compile-flags: --crate-type=lib +//@ compile-flags: --crate-type=lib -// pp-exact +//@ pp-exact // some single-line non-doc comment diff --git a/tests/pretty/dollar-crate.pp b/tests/pretty/dollar-crate.pp index 60fddb630d96..561a9500aaaa 100644 --- a/tests/pretty/dollar-crate.pp +++ b/tests/pretty/dollar-crate.pp @@ -4,8 +4,8 @@ use ::std::prelude::rust_2015::*; #[macro_use] extern crate std; -// pretty-compare-only -// pretty-mode:expanded -// pp-exact:dollar-crate.pp +//@ pretty-compare-only +//@ pretty-mode:expanded +//@ pp-exact:dollar-crate.pp fn main() { { ::std::io::_print(format_args!("rust\n")); }; } diff --git a/tests/pretty/dollar-crate.rs b/tests/pretty/dollar-crate.rs index e46bc7f4859a..6b500e1db753 100644 --- a/tests/pretty/dollar-crate.rs +++ b/tests/pretty/dollar-crate.rs @@ -1,6 +1,6 @@ -// pretty-compare-only -// pretty-mode:expanded -// pp-exact:dollar-crate.pp +//@ pretty-compare-only +//@ pretty-mode:expanded +//@ pp-exact:dollar-crate.pp fn main() { println!("rust"); diff --git a/tests/pretty/empty-impl.rs b/tests/pretty/empty-impl.rs index d570933592a0..b0275e4a3a38 100644 --- a/tests/pretty/empty-impl.rs +++ b/tests/pretty/empty-impl.rs @@ -1,4 +1,4 @@ -// compile-flags: --crate-type=lib +//@ compile-flags: --crate-type=lib trait X { fn dummy(&self) { } } impl X for usize { } diff --git a/tests/pretty/empty-lines.rs b/tests/pretty/empty-lines.rs index 15d7625d4e7c..f08ab5a11702 100644 --- a/tests/pretty/empty-lines.rs +++ b/tests/pretty/empty-lines.rs @@ -1,4 +1,4 @@ -// compile-flags: --crate-type=lib +//@ compile-flags: --crate-type=lib // Issue #759 // Whitespace under block opening should not expand forever diff --git a/tests/pretty/enum-variant-vis.rs b/tests/pretty/enum-variant-vis.rs index fc646c2956c4..3397e7dc8e28 100644 --- a/tests/pretty/enum-variant-vis.rs +++ b/tests/pretty/enum-variant-vis.rs @@ -1,4 +1,4 @@ -// pp-exact +//@ pp-exact // Check that the visibility is printed on an enum variant. diff --git a/tests/pretty/example1.rs b/tests/pretty/example1.rs index 8df74e8e1f9c..252d2828c92f 100644 --- a/tests/pretty/example1.rs +++ b/tests/pretty/example1.rs @@ -1,3 +1,3 @@ -// pp-exact +//@ pp-exact fn main() {} diff --git a/tests/pretty/example2.pp b/tests/pretty/example2.pp index 3f7129afde26..2524382e2b53 100644 --- a/tests/pretty/example2.pp +++ b/tests/pretty/example2.pp @@ -1,3 +1,3 @@ -// pp-exact:example2.pp +//@ pp-exact:example2.pp fn main() {} diff --git a/tests/pretty/example2.rs b/tests/pretty/example2.rs index 3f7129afde26..2524382e2b53 100644 --- a/tests/pretty/example2.rs +++ b/tests/pretty/example2.rs @@ -1,3 +1,3 @@ -// pp-exact:example2.pp +//@ pp-exact:example2.pp fn main() {} diff --git a/tests/pretty/expanded-and-path-remap-80832.pp b/tests/pretty/expanded-and-path-remap-80832.pp index 8385c5fa8c91..5b3922bb3294 100644 --- a/tests/pretty/expanded-and-path-remap-80832.pp +++ b/tests/pretty/expanded-and-path-remap-80832.pp @@ -6,8 +6,8 @@ use ::std::prelude::rust_2015::*; extern crate std; // Test for issue 80832 // -// pretty-mode:expanded -// pp-exact:expanded-and-path-remap-80832.pp -// compile-flags: --remap-path-prefix {{src-base}}=the/src +//@ pretty-mode:expanded +//@ pp-exact:expanded-and-path-remap-80832.pp +//@ compile-flags: --remap-path-prefix {{src-base}}=the/src fn main() {} diff --git a/tests/pretty/expanded-and-path-remap-80832.rs b/tests/pretty/expanded-and-path-remap-80832.rs index f48441fbc575..2e5dacfc0c17 100644 --- a/tests/pretty/expanded-and-path-remap-80832.rs +++ b/tests/pretty/expanded-and-path-remap-80832.rs @@ -1,7 +1,7 @@ // Test for issue 80832 // -// pretty-mode:expanded -// pp-exact:expanded-and-path-remap-80832.pp -// compile-flags: --remap-path-prefix {{src-base}}=the/src +//@ pretty-mode:expanded +//@ pp-exact:expanded-and-path-remap-80832.pp +//@ compile-flags: --remap-path-prefix {{src-base}}=the/src fn main() {} diff --git a/tests/pretty/fn-return.rs b/tests/pretty/fn-return.rs index b932e83aaf10..fc284a737bd2 100644 --- a/tests/pretty/fn-return.rs +++ b/tests/pretty/fn-return.rs @@ -1,4 +1,4 @@ -// pp-exact +//@ pp-exact // Check that `fn f() -> () {}` does not print as `fn f() {}`. diff --git a/tests/pretty/fn-types.rs b/tests/pretty/fn-types.rs index f012763c3f60..49c4d86acdb8 100644 --- a/tests/pretty/fn-types.rs +++ b/tests/pretty/fn-types.rs @@ -1,4 +1,4 @@ -// pp-exact +//@ pp-exact fn from_foreign_fn(_x: fn()) {} fn from_stack_closure(_x: F) where F: Fn() {} diff --git a/tests/pretty/fn-variadic.rs b/tests/pretty/fn-variadic.rs index 59e477cfa8ec..e11ec9bcdcbb 100644 --- a/tests/pretty/fn-variadic.rs +++ b/tests/pretty/fn-variadic.rs @@ -1,7 +1,7 @@ // Check that `fn foo(x: i32, ...)` does not print as `fn foo(x: i32, ..., ...)`. // See issue #58853. -// pp-exact +//@ pp-exact #![feature(c_variadic)] extern "C" { diff --git a/tests/pretty/for-comment.rs b/tests/pretty/for-comment.rs index 447e7f918c22..b35dd344d50c 100644 --- a/tests/pretty/for-comment.rs +++ b/tests/pretty/for-comment.rs @@ -1,6 +1,6 @@ -// compile-flags: --crate-type=lib +//@ compile-flags: --crate-type=lib -// pp-exact +//@ pp-exact fn f(v: &[isize]) -> isize { let mut n = 0; diff --git a/tests/pretty/format-args-str-escape.pp b/tests/pretty/format-args-str-escape.pp index b84bc2303b73..277b608475cf 100644 --- a/tests/pretty/format-args-str-escape.pp +++ b/tests/pretty/format-args-str-escape.pp @@ -4,9 +4,9 @@ use ::std::prelude::rust_2015::*; #[macro_use] extern crate std; -// pretty-compare-only -// pretty-mode:expanded -// pp-exact:format-args-str-escape.pp +//@ pretty-compare-only +//@ pretty-mode:expanded +//@ pp-exact:format-args-str-escape.pp fn main() { { ::std::io::_print(format_args!("\u{1b}[1mHello, world!\u{1b}[0m\n")); }; diff --git a/tests/pretty/format-args-str-escape.rs b/tests/pretty/format-args-str-escape.rs index e596fcfd8bcb..ab4e85b38347 100644 --- a/tests/pretty/format-args-str-escape.rs +++ b/tests/pretty/format-args-str-escape.rs @@ -1,6 +1,6 @@ -// pretty-compare-only -// pretty-mode:expanded -// pp-exact:format-args-str-escape.pp +//@ pretty-compare-only +//@ pretty-mode:expanded +//@ pp-exact:format-args-str-escape.pp fn main() { println!("\x1B[1mHello, world!\x1B[0m"); diff --git a/tests/pretty/gat-bounds.rs b/tests/pretty/gat-bounds.rs index 0a361a3835f7..7f5cdeef7359 100644 --- a/tests/pretty/gat-bounds.rs +++ b/tests/pretty/gat-bounds.rs @@ -1,7 +1,7 @@ // Check that associated types print generic parameters and where clauses. // See issue #67509. -// pretty-compare-only +//@ pretty-compare-only trait X { type Y: Trait where Self: Sized; diff --git a/tests/pretty/hir-fn-variadic.pp b/tests/pretty/hir-fn-variadic.pp index 577d9400ad4e..978e65c825bb 100644 --- a/tests/pretty/hir-fn-variadic.pp +++ b/tests/pretty/hir-fn-variadic.pp @@ -1,6 +1,6 @@ -// pretty-compare-only -// pretty-mode:hir -// pp-exact:hir-fn-variadic.pp +//@ pretty-compare-only +//@ pretty-mode:hir +//@ pp-exact:hir-fn-variadic.pp #![feature(c_variadic)] #[prelude_import] diff --git a/tests/pretty/hir-fn-variadic.rs b/tests/pretty/hir-fn-variadic.rs index efb2754df623..3d3f7ee18315 100644 --- a/tests/pretty/hir-fn-variadic.rs +++ b/tests/pretty/hir-fn-variadic.rs @@ -1,6 +1,6 @@ -// pretty-compare-only -// pretty-mode:hir -// pp-exact:hir-fn-variadic.pp +//@ pretty-compare-only +//@ pretty-mode:hir +//@ pp-exact:hir-fn-variadic.pp #![feature(c_variadic)] diff --git a/tests/pretty/hir-pretty-loop.pp b/tests/pretty/hir-pretty-loop.pp index a59a3002c7f6..15f1677885ae 100644 --- a/tests/pretty/hir-pretty-loop.pp +++ b/tests/pretty/hir-pretty-loop.pp @@ -2,8 +2,8 @@ use ::std::prelude::rust_2015::*; #[macro_use] extern crate std; -// pretty-compare-only -// pretty-mode:hir -// pp-exact:hir-pretty-loop.pp +//@ pretty-compare-only +//@ pretty-mode:hir +//@ pp-exact:hir-pretty-loop.pp fn foo() { loop { break; } } diff --git a/tests/pretty/hir-pretty-loop.rs b/tests/pretty/hir-pretty-loop.rs index 87a3ef8b8f91..148e8316a674 100644 --- a/tests/pretty/hir-pretty-loop.rs +++ b/tests/pretty/hir-pretty-loop.rs @@ -1,6 +1,6 @@ -// pretty-compare-only -// pretty-mode:hir -// pp-exact:hir-pretty-loop.pp +//@ pretty-compare-only +//@ pretty-mode:hir +//@ pp-exact:hir-pretty-loop.pp pub fn foo(){ loop{ diff --git a/tests/pretty/if-attr.rs b/tests/pretty/if-attr.rs index 7b90b0becacb..89d6130f6592 100644 --- a/tests/pretty/if-attr.rs +++ b/tests/pretty/if-attr.rs @@ -1,4 +1,4 @@ -// pp-exact +//@ pp-exact #[cfg(FALSE)] fn simple_attr() { diff --git a/tests/pretty/import-renames.rs b/tests/pretty/import-renames.rs index ce6b5058ba6b..b8c743696843 100644 --- a/tests/pretty/import-renames.rs +++ b/tests/pretty/import-renames.rs @@ -1,6 +1,6 @@ -// compile-flags: --crate-type=lib +//@ compile-flags: --crate-type=lib -// pp-exact +//@ pp-exact use std::io::{self, Error as IoError}; use std::net::{self as stdnet, TcpStream}; diff --git a/tests/pretty/issue-12590-a.rs b/tests/pretty/issue-12590-a.rs index 3c88f5cb8a41..fbf983b5a628 100644 --- a/tests/pretty/issue-12590-a.rs +++ b/tests/pretty/issue-12590-a.rs @@ -1,5 +1,5 @@ -// pp-exact -// pretty-compare-only +//@ pp-exact +//@ pretty-compare-only // The next line should not be expanded diff --git a/tests/pretty/issue-12590-c.pp b/tests/pretty/issue-12590-c.pp index 07b3f5653d36..691738a89ed8 100644 --- a/tests/pretty/issue-12590-c.pp +++ b/tests/pretty/issue-12590-c.pp @@ -4,9 +4,9 @@ use ::std::prelude::rust_2015::*; #[macro_use] extern crate std; -// pretty-compare-only -// pretty-mode:expanded -// pp-exact:issue-12590-c.pp +//@ pretty-compare-only +//@ pretty-mode:expanded +//@ pp-exact:issue-12590-c.pp // The next line should be expanded diff --git a/tests/pretty/issue-12590-c.rs b/tests/pretty/issue-12590-c.rs index 0ec05f9a8051..bfaf92d72246 100644 --- a/tests/pretty/issue-12590-c.rs +++ b/tests/pretty/issue-12590-c.rs @@ -1,6 +1,6 @@ -// pretty-compare-only -// pretty-mode:expanded -// pp-exact:issue-12590-c.pp +//@ pretty-compare-only +//@ pretty-mode:expanded +//@ pp-exact:issue-12590-c.pp // The next line should be expanded diff --git a/tests/pretty/issue-19077.rs b/tests/pretty/issue-19077.rs index 0d2702804d12..c57ea0cf02d1 100644 --- a/tests/pretty/issue-19077.rs +++ b/tests/pretty/issue-19077.rs @@ -1,6 +1,6 @@ // // Testing that unsafe blocks in match arms are followed by a comma -// pp-exact +//@ pp-exact fn main() { match true { true if true => (), diff --git a/tests/pretty/issue-25031.rs b/tests/pretty/issue-25031.rs index d91494891d4d..5874631a2b41 100644 --- a/tests/pretty/issue-25031.rs +++ b/tests/pretty/issue-25031.rs @@ -1,7 +1,7 @@ // // Testing that type items with where clauses output correctly. -// pp-exact +//@ pp-exact fn main() { type Foo where T: Copy = Box; diff --git a/tests/pretty/issue-30731.rs b/tests/pretty/issue-30731.rs index 607cbebee170..73bdafe2e683 100644 --- a/tests/pretty/issue-30731.rs +++ b/tests/pretty/issue-30731.rs @@ -2,7 +2,7 @@ // Test pretty printing of macro with braces but without terminating semicolon, // this used to panic before fix. -// pretty-compare-only -// pp-exact +//@ pretty-compare-only +//@ pp-exact fn main() { b! {} c } diff --git a/tests/pretty/issue-31073.pp b/tests/pretty/issue-31073.pp index 75795f6d5689..b3f8c6ce5dae 100644 --- a/tests/pretty/issue-31073.pp +++ b/tests/pretty/issue-31073.pp @@ -1,4 +1,4 @@ -// pp-exact:issue-31073.pp +//@ pp-exact:issue-31073.pp fn main() { fn f1(x: i32, y: i32) -> i32 { y } diff --git a/tests/pretty/issue-31073.rs b/tests/pretty/issue-31073.rs index 75795f6d5689..b3f8c6ce5dae 100644 --- a/tests/pretty/issue-31073.rs +++ b/tests/pretty/issue-31073.rs @@ -1,4 +1,4 @@ -// pp-exact:issue-31073.pp +//@ pp-exact:issue-31073.pp fn main() { fn f1(x: i32, y: i32) -> i32 { y } diff --git a/tests/pretty/issue-4264.pp b/tests/pretty/issue-4264.pp index 2d713832dcd3..af64260d0200 100644 --- a/tests/pretty/issue-4264.pp +++ b/tests/pretty/issue-4264.pp @@ -2,9 +2,9 @@ use ::std::prelude::rust_2015::*; #[macro_use] extern crate std; -// pretty-compare-only -// pretty-mode:hir,typed -// pp-exact:issue-4264.pp +//@ pretty-compare-only +//@ pretty-mode:hir,typed +//@ pp-exact:issue-4264.pp // #4264 fixed-length vector types diff --git a/tests/pretty/issue-4264.rs b/tests/pretty/issue-4264.rs index 3dea81129818..09840234b8c0 100644 --- a/tests/pretty/issue-4264.rs +++ b/tests/pretty/issue-4264.rs @@ -1,6 +1,6 @@ -// pretty-compare-only -// pretty-mode:hir,typed -// pp-exact:issue-4264.pp +//@ pretty-compare-only +//@ pretty-mode:hir,typed +//@ pp-exact:issue-4264.pp // #4264 fixed-length vector types diff --git a/tests/pretty/issue-68710-field-attr-proc-mac-lost.rs b/tests/pretty/issue-68710-field-attr-proc-mac-lost.rs index 80f739f4f9e1..ce17abea3549 100644 --- a/tests/pretty/issue-68710-field-attr-proc-mac-lost.rs +++ b/tests/pretty/issue-68710-field-attr-proc-mac-lost.rs @@ -1,4 +1,4 @@ -// pp-exact +//@ pp-exact fn main() {} diff --git a/tests/pretty/issue-74745.rs b/tests/pretty/issue-74745.rs index e255cd6caa86..b2f10b758628 100644 --- a/tests/pretty/issue-74745.rs +++ b/tests/pretty/issue-74745.rs @@ -1,5 +1,5 @@ // ignore-tidy-trailing-newlines -// pretty-compare-only +//@ pretty-compare-only /* */ \ No newline at end of file diff --git a/tests/pretty/issue-85089.pp b/tests/pretty/issue-85089.pp index f84e9df04a2a..f4e0eb3dd5ff 100644 --- a/tests/pretty/issue-85089.pp +++ b/tests/pretty/issue-85089.pp @@ -4,9 +4,9 @@ use ::std::prelude::rust_2015::*; extern crate std; // Test to print lifetimes on HIR pretty-printing. -// pretty-compare-only -// pretty-mode:hir -// pp-exact:issue-85089.pp +//@ pretty-compare-only +//@ pretty-mode:hir +//@ pp-exact:issue-85089.pp trait A<'x> { } trait B<'x> { } diff --git a/tests/pretty/issue-85089.rs b/tests/pretty/issue-85089.rs index eb45d473119d..0327dee6959b 100644 --- a/tests/pretty/issue-85089.rs +++ b/tests/pretty/issue-85089.rs @@ -1,8 +1,8 @@ // Test to print lifetimes on HIR pretty-printing. -// pretty-compare-only -// pretty-mode:hir -// pp-exact:issue-85089.pp +//@ pretty-compare-only +//@ pretty-mode:hir +//@ pp-exact:issue-85089.pp trait A<'x> {} trait B<'x> {} diff --git a/tests/pretty/let.rs b/tests/pretty/let.rs index 20ffb7578182..04eb0d9ead1b 100644 --- a/tests/pretty/let.rs +++ b/tests/pretty/let.rs @@ -1,4 +1,4 @@ -// pp-exact +//@ pp-exact // Check that `let x: _ = 0;` does not print as `let x = 0;`. diff --git a/tests/pretty/lifetime.rs b/tests/pretty/lifetime.rs index 34eae849be45..2a36fe8312ec 100644 --- a/tests/pretty/lifetime.rs +++ b/tests/pretty/lifetime.rs @@ -1,4 +1,4 @@ -// pp-exact +//@ pp-exact fn f1<'a, 'b, 'c>(_x: &'a u32, _y: &'b u32, _z: &'c u32) where 'c: 'a + 'b {} diff --git a/tests/pretty/macro.rs b/tests/pretty/macro.rs index b88ae703950b..d8ce285d0d5f 100644 --- a/tests/pretty/macro.rs +++ b/tests/pretty/macro.rs @@ -1,4 +1,4 @@ -// pp-exact +//@ pp-exact #![feature(decl_macro)] diff --git a/tests/pretty/macro_rules.rs b/tests/pretty/macro_rules.rs index a5265446ee79..b817c395ed25 100644 --- a/tests/pretty/macro_rules.rs +++ b/tests/pretty/macro_rules.rs @@ -1,4 +1,4 @@ -// pp-exact +//@ pp-exact macro_rules! brace { () => {}; } diff --git a/tests/pretty/match-block-expr.rs b/tests/pretty/match-block-expr.rs index 10903e928cda..151a2d40f25f 100644 --- a/tests/pretty/match-block-expr.rs +++ b/tests/pretty/match-block-expr.rs @@ -1,4 +1,4 @@ -// pp-exact +//@ pp-exact fn main() { let x = match { 5 } { 1 => 5, 2 => 6, _ => 7, }; diff --git a/tests/pretty/match-naked-expr-medium.rs b/tests/pretty/match-naked-expr-medium.rs index 836af99002d6..1d18544384cc 100644 --- a/tests/pretty/match-naked-expr-medium.rs +++ b/tests/pretty/match-naked-expr-medium.rs @@ -1,4 +1,4 @@ -// pp-exact +//@ pp-exact fn main() { let x = Some(3); diff --git a/tests/pretty/match-naked-expr.rs b/tests/pretty/match-naked-expr.rs index 7c16bbefe3c2..9d79b7b18e65 100644 --- a/tests/pretty/match-naked-expr.rs +++ b/tests/pretty/match-naked-expr.rs @@ -1,4 +1,4 @@ -// pp-exact +//@ pp-exact fn main() { let x = Some(3); diff --git a/tests/pretty/nested-item-vis-defaultness.rs b/tests/pretty/nested-item-vis-defaultness.rs index b094ba577db2..1e971fcf07a5 100644 --- a/tests/pretty/nested-item-vis-defaultness.rs +++ b/tests/pretty/nested-item-vis-defaultness.rs @@ -1,6 +1,6 @@ // Check that nested items have their visibility and `default`nesses in the right order. -// pp-exact +//@ pp-exact fn main() {} diff --git a/tests/pretty/offset_of.rs b/tests/pretty/offset_of.rs index 1307c335ad32..6cb27c7fdfb7 100644 --- a/tests/pretty/offset_of.rs +++ b/tests/pretty/offset_of.rs @@ -1,3 +1,3 @@ -// pp-exact +//@ pp-exact fn main() { std::mem::offset_of!(std :: ops :: Range < usize >, end); } diff --git a/tests/pretty/path-type-bounds.rs b/tests/pretty/path-type-bounds.rs index f1970de6feb4..e7ae1331e401 100644 --- a/tests/pretty/path-type-bounds.rs +++ b/tests/pretty/path-type-bounds.rs @@ -1,4 +1,4 @@ -// pp-exact +//@ pp-exact trait Tr { diff --git a/tests/pretty/qpath-associated-type-bound.rs b/tests/pretty/qpath-associated-type-bound.rs index 67a5d1dd8ec6..031e36a7dfa1 100644 --- a/tests/pretty/qpath-associated-type-bound.rs +++ b/tests/pretty/qpath-associated-type-bound.rs @@ -1,4 +1,4 @@ -// pp-exact +//@ pp-exact mod m { diff --git a/tests/pretty/raw-address-of.rs b/tests/pretty/raw-address-of.rs index 6ccc434a1e79..6e97ab99407f 100644 --- a/tests/pretty/raw-address-of.rs +++ b/tests/pretty/raw-address-of.rs @@ -1,4 +1,4 @@ -// pp-exact +//@ pp-exact #![feature(raw_ref_op)] const C_PTR: () = { let a = 1; &raw const a; }; diff --git a/tests/pretty/raw-str-nonexpr.rs b/tests/pretty/raw-str-nonexpr.rs index 12440b5ae6ed..5b9347b012bb 100644 --- a/tests/pretty/raw-str-nonexpr.rs +++ b/tests/pretty/raw-str-nonexpr.rs @@ -1,5 +1,5 @@ -// needs-asm-support -// pp-exact +//@ needs-asm-support +//@ pp-exact #[cfg(foo = r#"just parse this"#)] extern crate blah as blah; diff --git a/tests/pretty/stmt_expr_attributes.rs b/tests/pretty/stmt_expr_attributes.rs index 69b153175615..98ad98b863ac 100644 --- a/tests/pretty/stmt_expr_attributes.rs +++ b/tests/pretty/stmt_expr_attributes.rs @@ -1,4 +1,4 @@ -// pp-exact +//@ pp-exact #![feature(inline_const)] #![feature(inline_const_pat)] diff --git a/tests/pretty/struct-pattern.rs b/tests/pretty/struct-pattern.rs index 6acb2e27f4fa..31de95e74a37 100644 --- a/tests/pretty/struct-pattern.rs +++ b/tests/pretty/struct-pattern.rs @@ -1,5 +1,5 @@ -// pp-exact -// pretty-compare-only +//@ pp-exact +//@ pretty-compare-only // Testing that shorthand struct patterns are preserved fn main() { let Foo { a, ref b, mut c, x: y, z: z } = foo; } diff --git a/tests/pretty/struct-tuple.rs b/tests/pretty/struct-tuple.rs index 77e064b4fa41..5f1de04f0c63 100644 --- a/tests/pretty/struct-tuple.rs +++ b/tests/pretty/struct-tuple.rs @@ -1,4 +1,4 @@ -// pp-exact +//@ pp-exact struct Foo; struct Bar(isize, isize); diff --git a/tests/pretty/tag-blank-lines.rs b/tests/pretty/tag-blank-lines.rs index d53f6e4b5285..42f33dfef8a6 100644 --- a/tests/pretty/tag-blank-lines.rs +++ b/tests/pretty/tag-blank-lines.rs @@ -1,4 +1,4 @@ -// pp-exact +//@ pp-exact enum foo { bar, // a bar. diff --git a/tests/pretty/tests-are-sorted.pp b/tests/pretty/tests-are-sorted.pp index fbdad0c323f3..816cd5a5c072 100644 --- a/tests/pretty/tests-are-sorted.pp +++ b/tests/pretty/tests-are-sorted.pp @@ -4,10 +4,10 @@ use ::std::prelude::rust_2015::*; #[macro_use] extern crate std; -// compile-flags: --crate-type=lib --test --remap-path-prefix={{src-base}}/=/the/src/ --remap-path-prefix={{src-base}}\=/the/src/ -// pretty-compare-only -// pretty-mode:expanded -// pp-exact:tests-are-sorted.pp +//@ compile-flags: --crate-type=lib --test --remap-path-prefix={{src-base}}/=/the/src/ --remap-path-prefix={{src-base}}\=/the/src/ +//@ pretty-compare-only +//@ pretty-mode:expanded +//@ pp-exact:tests-are-sorted.pp extern crate test; #[cfg(test)] diff --git a/tests/pretty/tests-are-sorted.rs b/tests/pretty/tests-are-sorted.rs index 39e0922250b8..0326eba4a449 100644 --- a/tests/pretty/tests-are-sorted.rs +++ b/tests/pretty/tests-are-sorted.rs @@ -1,7 +1,7 @@ -// compile-flags: --crate-type=lib --test --remap-path-prefix={{src-base}}/=/the/src/ --remap-path-prefix={{src-base}}\=/the/src/ -// pretty-compare-only -// pretty-mode:expanded -// pp-exact:tests-are-sorted.pp +//@ compile-flags: --crate-type=lib --test --remap-path-prefix={{src-base}}/=/the/src/ --remap-path-prefix={{src-base}}\=/the/src/ +//@ pretty-compare-only +//@ pretty-mode:expanded +//@ pp-exact:tests-are-sorted.pp #[test] fn m_test() {} diff --git a/tests/pretty/top-level-doc-comments.rs b/tests/pretty/top-level-doc-comments.rs index b97927124c30..b20e45c2c400 100644 --- a/tests/pretty/top-level-doc-comments.rs +++ b/tests/pretty/top-level-doc-comments.rs @@ -1,7 +1,7 @@ /// Some doc comment. struct X; -// pp-exact +//@ pp-exact // Test that rust can properly pretty print a doc comment if it's the first line in a file. some diff --git a/tests/pretty/trait-inner-attr.rs b/tests/pretty/trait-inner-attr.rs index 6cb0e4136b62..ad3fed1877cf 100644 --- a/tests/pretty/trait-inner-attr.rs +++ b/tests/pretty/trait-inner-attr.rs @@ -1,4 +1,4 @@ -// pp-exact +//@ pp-exact trait Foo { #![allow(bar)] diff --git a/tests/pretty/trait-polarity.rs b/tests/pretty/trait-polarity.rs index 310506eabca1..d4d8bd6fd61e 100644 --- a/tests/pretty/trait-polarity.rs +++ b/tests/pretty/trait-polarity.rs @@ -1,6 +1,6 @@ #![feature(negative_impls)] -// pp-exact +//@ pp-exact struct Test; diff --git a/tests/pretty/trait-safety.rs b/tests/pretty/trait-safety.rs index c4ae7606946b..8865573e7d08 100644 --- a/tests/pretty/trait-safety.rs +++ b/tests/pretty/trait-safety.rs @@ -1,4 +1,4 @@ -// pp-exact +//@ pp-exact unsafe trait UnsafeTrait { fn foo(&self); diff --git a/tests/pretty/unary-op-disambig.rs b/tests/pretty/unary-op-disambig.rs index 0c57e0a33717..d6f698cdf416 100644 --- a/tests/pretty/unary-op-disambig.rs +++ b/tests/pretty/unary-op-disambig.rs @@ -1,4 +1,4 @@ -// compile-flags: --crate-type=lib +//@ compile-flags: --crate-type=lib // Preserve semicolons that disambiguate unops diff --git a/tests/pretty/use-tree.rs b/tests/pretty/use-tree.rs index 5da952352455..ead26e8ab477 100644 --- a/tests/pretty/use-tree.rs +++ b/tests/pretty/use-tree.rs @@ -1,5 +1,5 @@ -// pp-exact -// edition:2021 +//@ pp-exact +//@ edition:2021 #![allow(unused_imports)] diff --git a/tests/pretty/vec-comments.pp b/tests/pretty/vec-comments.pp index f2f807c59de9..04189589a387 100644 --- a/tests/pretty/vec-comments.pp +++ b/tests/pretty/vec-comments.pp @@ -1,6 +1,6 @@ // Issue #679 // Testing that comments are correctly interleaved -// pp-exact:vec-comments.pp +//@ pp-exact:vec-comments.pp fn main() { let _v1 = [ diff --git a/tests/pretty/vec-comments.rs b/tests/pretty/vec-comments.rs index a150cf0b8ea8..64ae5ae5eb7c 100644 --- a/tests/pretty/vec-comments.rs +++ b/tests/pretty/vec-comments.rs @@ -1,6 +1,6 @@ // Issue #679 // Testing that comments are correctly interleaved -// pp-exact:vec-comments.pp +//@ pp-exact:vec-comments.pp fn main() { let _v1 = [ diff --git a/tests/pretty/where-clauses.rs b/tests/pretty/where-clauses.rs index 4183799457b7..27807d4c3820 100644 --- a/tests/pretty/where-clauses.rs +++ b/tests/pretty/where-clauses.rs @@ -1,4 +1,4 @@ -// pp-exact +//@ pp-exact fn f<'a, 'b, T>(t: T) -> isize where T: 'a, 'a: 'b, T: Eq { 0 } diff --git a/tests/pretty/yeet-expr.rs b/tests/pretty/yeet-expr.rs index c899f11b7240..6c449eb8851d 100644 --- a/tests/pretty/yeet-expr.rs +++ b/tests/pretty/yeet-expr.rs @@ -1,4 +1,4 @@ -// pp-exact +//@ pp-exact #![feature(yeet_expr)] fn yeet_no_expr() -> Option { do yeet } diff --git a/tests/run-make/const_fn_mir/main.rs b/tests/run-make/const_fn_mir/main.rs index e8552bd285a8..f3f7dc576dd9 100644 --- a/tests/run-make/const_fn_mir/main.rs +++ b/tests/run-make/const_fn_mir/main.rs @@ -1,5 +1,5 @@ // emit-mir -// check-pass +//@ check-pass const fn foo() -> i32 { 5 + 6 diff --git a/tests/run-make/export-executable-symbols/main.rs b/tests/run-make/export-executable-symbols/main.rs index c498381a33f6..a9bd6412b448 100644 --- a/tests/run-make/export-executable-symbols/main.rs +++ b/tests/run-make/export-executable-symbols/main.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 fn main() {} diff --git a/tests/run-make/issue-47551/eh_frame-terminator.rs b/tests/run-make/issue-47551/eh_frame-terminator.rs index a2c7a31b7c32..35db4bc7d1f7 100644 --- a/tests/run-make/issue-47551/eh_frame-terminator.rs +++ b/tests/run-make/issue-47551/eh_frame-terminator.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #[derive(Clone, Copy)] struct Foo { diff --git a/tests/run-pass-valgrind/coerce-match-calls.rs b/tests/run-pass-valgrind/coerce-match-calls.rs index 60943aad80dc..f6c7151ff103 100644 --- a/tests/run-pass-valgrind/coerce-match-calls.rs +++ b/tests/run-pass-valgrind/coerce-match-calls.rs @@ -1,6 +1,6 @@ // Check that coercions are propagated through match and if expressions. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::boxed::Box; diff --git a/tests/run-pass-valgrind/coerce-match.rs b/tests/run-pass-valgrind/coerce-match.rs index 5b78f1ec77c5..3f33264c5a80 100644 --- a/tests/run-pass-valgrind/coerce-match.rs +++ b/tests/run-pass-valgrind/coerce-match.rs @@ -1,6 +1,6 @@ // Check that coercions are propagated through match and if expressions. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub fn main() { let _: Box<[isize]> = if true { diff --git a/tests/run-pass-valgrind/down-with-thread-dtors.rs b/tests/run-pass-valgrind/down-with-thread-dtors.rs index 8531b8d83260..15aeac98c667 100644 --- a/tests/run-pass-valgrind/down-with-thread-dtors.rs +++ b/tests/run-pass-valgrind/down-with-thread-dtors.rs @@ -1,4 +1,4 @@ -// ignore-emscripten +//@ ignore-emscripten thread_local!(static FOO: Foo = Foo); thread_local!(static BAR: Bar = Bar(1)); diff --git a/tests/run-pass-valgrind/exit-flushes.rs b/tests/run-pass-valgrind/exit-flushes.rs index 9daf487d39fe..c54f9243950e 100644 --- a/tests/run-pass-valgrind/exit-flushes.rs +++ b/tests/run-pass-valgrind/exit-flushes.rs @@ -1,6 +1,6 @@ -// ignore-emscripten -// ignore-sgx no processes -// ignore-macos this needs valgrind 3.11 or higher; see +//@ ignore-emscripten +//@ ignore-sgx no processes +//@ ignore-macos this needs valgrind 3.11 or higher; see // https://github.com/rust-lang/rust/pull/30365#issuecomment-165763679 use std::env; diff --git a/tests/run-pass-valgrind/osx-frameworks.rs b/tests/run-pass-valgrind/osx-frameworks.rs index 571621c1de77..71465c0d1997 100644 --- a/tests/run-pass-valgrind/osx-frameworks.rs +++ b/tests/run-pass-valgrind/osx-frameworks.rs @@ -1,4 +1,4 @@ -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![feature(rustc_private)] diff --git a/tests/rustdoc-gui/src/extend_css/lib.rs b/tests/rustdoc-gui/src/extend_css/lib.rs index 2308c0932fd0..734195823fc6 100644 --- a/tests/rustdoc-gui/src/extend_css/lib.rs +++ b/tests/rustdoc-gui/src/extend_css/lib.rs @@ -1,2 +1,2 @@ -// compile-flags: --extend-css extra.css +//@ compile-flags: --extend-css extra.css //!
text in red
diff --git a/tests/rustdoc-gui/src/link_to_definition/lib.rs b/tests/rustdoc-gui/src/link_to_definition/lib.rs index 6fed79aedb89..539b6fe35c60 100644 --- a/tests/rustdoc-gui/src/link_to_definition/lib.rs +++ b/tests/rustdoc-gui/src/link_to_definition/lib.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zunstable-options --generate-link-to-definition +//@ compile-flags: -Zunstable-options --generate-link-to-definition pub fn sub_fn() { barbar(); } diff --git a/tests/rustdoc-gui/src/scrape_examples/src/lib.rs b/tests/rustdoc-gui/src/scrape_examples/src/lib.rs index 6666587ad541..d6351c53074d 100644 --- a/tests/rustdoc-gui/src/scrape_examples/src/lib.rs +++ b/tests/rustdoc-gui/src/scrape_examples/src/lib.rs @@ -1,4 +1,4 @@ -// run-flags:-Zrustdoc-scrape-examples +//@ run-flags:-Zrustdoc-scrape-examples /// # Examples /// /// ``` diff --git a/tests/rustdoc-gui/src/theme_css/lib.rs b/tests/rustdoc-gui/src/theme_css/lib.rs index e9f3265fa6ba..8ec524639a5f 100644 --- a/tests/rustdoc-gui/src/theme_css/lib.rs +++ b/tests/rustdoc-gui/src/theme_css/lib.rs @@ -1,2 +1,2 @@ -// compile-flags: --theme custom-theme.css +//@ compile-flags: --theme custom-theme.css //!
custom text
diff --git a/tests/rustdoc-js/search-non-local-trait-impl.rs b/tests/rustdoc-js/search-non-local-trait-impl.rs index 462b75b0b132..7c9b2ad80d0d 100644 --- a/tests/rustdoc-js/search-non-local-trait-impl.rs +++ b/tests/rustdoc-js/search-non-local-trait-impl.rs @@ -1,6 +1,6 @@ -// aux-crate:priv:equivalent=equivalent.rs -// compile-flags: -Zunstable-options --extern equivalent -// edition:2018 +//@ aux-crate:priv:equivalent=equivalent.rs +//@ compile-flags: -Zunstable-options --extern equivalent +//@ edition:2018 extern crate equivalent; diff --git a/tests/rustdoc-json/enums/doc_link_to_foreign_variant.rs b/tests/rustdoc-json/enums/doc_link_to_foreign_variant.rs index b00156124fc2..784a93c893ac 100644 --- a/tests/rustdoc-json/enums/doc_link_to_foreign_variant.rs +++ b/tests/rustdoc-json/enums/doc_link_to_foreign_variant.rs @@ -1,4 +1,4 @@ -// aux-build: color.rs +//@ aux-build: color.rs //! The purpose of this test it to have a link to [a foreign variant](Red). diff --git a/tests/rustdoc-json/enums/use_variant_foreign.rs b/tests/rustdoc-json/enums/use_variant_foreign.rs index a79e899d85f3..c42ead644614 100644 --- a/tests/rustdoc-json/enums/use_variant_foreign.rs +++ b/tests/rustdoc-json/enums/use_variant_foreign.rs @@ -1,4 +1,4 @@ -// aux-build: color.rs +//@ aux-build: color.rs extern crate color; diff --git a/tests/rustdoc-json/fns/async_return.rs b/tests/rustdoc-json/fns/async_return.rs index 8192f2e6ae63..32117d73657d 100644 --- a/tests/rustdoc-json/fns/async_return.rs +++ b/tests/rustdoc-json/fns/async_return.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 // ignore-tidy-linelength // Regression test for diff --git a/tests/rustdoc-json/fns/qualifiers.rs b/tests/rustdoc-json/fns/qualifiers.rs index 643865a3f07f..6293b8112267 100644 --- a/tests/rustdoc-json/fns/qualifiers.rs +++ b/tests/rustdoc-json/fns/qualifiers.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // @is "$.index[*][?(@.name=='nothing_fn')].inner.function.header.async" false // @is "$.index[*][?(@.name=='nothing_fn')].inner.function.header.const" false diff --git a/tests/rustdoc-json/impls/foreign_for_local.rs b/tests/rustdoc-json/impls/foreign_for_local.rs index 20e1cecd778c..d5265ba11bd7 100644 --- a/tests/rustdoc-json/impls/foreign_for_local.rs +++ b/tests/rustdoc-json/impls/foreign_for_local.rs @@ -1,4 +1,4 @@ -// aux-build: foreign_trait.rs +//@ aux-build: foreign_trait.rs extern crate foreign_trait; /// ForeignTrait id hack diff --git a/tests/rustdoc-json/impls/impl_item_visibility_show_hidden.rs b/tests/rustdoc-json/impls/impl_item_visibility_show_hidden.rs index fa3a36df8563..431220a473d6 100644 --- a/tests/rustdoc-json/impls/impl_item_visibility_show_hidden.rs +++ b/tests/rustdoc-json/impls/impl_item_visibility_show_hidden.rs @@ -1,4 +1,4 @@ -// compile-flags: --document-hidden-items +//@ compile-flags: --document-hidden-items pub struct Foo; diff --git a/tests/rustdoc-json/impls/impl_item_visibility_show_private.rs b/tests/rustdoc-json/impls/impl_item_visibility_show_private.rs index 7c68a2412f36..aa1eb9896650 100644 --- a/tests/rustdoc-json/impls/impl_item_visibility_show_private.rs +++ b/tests/rustdoc-json/impls/impl_item_visibility_show_private.rs @@ -1,4 +1,4 @@ -// compile-flags: --document-private-items +//@ compile-flags: --document-private-items pub struct Foo; diff --git a/tests/rustdoc-json/impls/issue-112852-dangling-trait-impl-id-3.rs b/tests/rustdoc-json/impls/issue-112852-dangling-trait-impl-id-3.rs index 836f1fe87da3..c09c916a530f 100644 --- a/tests/rustdoc-json/impls/issue-112852-dangling-trait-impl-id-3.rs +++ b/tests/rustdoc-json/impls/issue-112852-dangling-trait-impl-id-3.rs @@ -1,4 +1,4 @@ -// compile-flags: --document-hidden-items +//@ compile-flags: --document-hidden-items // @has "$.index[*][?(@.name == 'HiddenPubStruct')]" // @has "$.index[*][?(@.inner.impl)]" diff --git a/tests/rustdoc-json/impls/local_for_foreign.rs b/tests/rustdoc-json/impls/local_for_foreign.rs index 72352ce88da0..019f7d625cb2 100644 --- a/tests/rustdoc-json/impls/local_for_foreign.rs +++ b/tests/rustdoc-json/impls/local_for_foreign.rs @@ -1,4 +1,4 @@ -// aux-build: foreign_struct.rs +//@ aux-build: foreign_struct.rs extern crate foreign_struct; /// ForeignStruct id hack diff --git a/tests/rustdoc-json/intra-doc-links/foreign_variant.rs b/tests/rustdoc-json/intra-doc-links/foreign_variant.rs index e29682313386..40e1f6b1f0af 100644 --- a/tests/rustdoc-json/intra-doc-links/foreign_variant.rs +++ b/tests/rustdoc-json/intra-doc-links/foreign_variant.rs @@ -1,5 +1,5 @@ // Regression test for -// aux-build: enum_variant_in_trait_method.rs +//@ aux-build: enum_variant_in_trait_method.rs extern crate enum_variant_in_trait_method; diff --git a/tests/rustdoc-json/methods/qualifiers.rs b/tests/rustdoc-json/methods/qualifiers.rs index 65977bc826fe..dac90b7ff6fb 100644 --- a/tests/rustdoc-json/methods/qualifiers.rs +++ b/tests/rustdoc-json/methods/qualifiers.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 pub struct Foo; diff --git a/tests/rustdoc-json/nested.rs b/tests/rustdoc-json/nested.rs index e012cfc5014c..c0a47c467e3f 100644 --- a/tests/rustdoc-json/nested.rs +++ b/tests/rustdoc-json/nested.rs @@ -1,5 +1,5 @@ -// edition:2018 -// compile-flags: --crate-version 1.0.0 +//@ edition:2018 +//@ compile-flags: --crate-version 1.0.0 // @is "$.crate_version" \"1.0.0\" // @has "$.index[*][?(@.name=='nested')].inner.module" diff --git a/tests/rustdoc-json/output_generics.rs b/tests/rustdoc-json/output_generics.rs index 04b1a358fba4..d421eafbb47b 100644 --- a/tests/rustdoc-json/output_generics.rs +++ b/tests/rustdoc-json/output_generics.rs @@ -1,4 +1,4 @@ -// compile-flags: --document-private-items --document-hidden-items +//@ compile-flags: --document-private-items --document-hidden-items // This is a regression test for #98009. diff --git a/tests/rustdoc-json/primitives/primitive_overloading.rs b/tests/rustdoc-json/primitives/primitive_overloading.rs index 50e23fc06d3e..e4ffbdf02958 100644 --- a/tests/rustdoc-json/primitives/primitive_overloading.rs +++ b/tests/rustdoc-json/primitives/primitive_overloading.rs @@ -1,4 +1,4 @@ -// compile-flags: --document-private-items +//@ compile-flags: --document-private-items // Regression test for . diff --git a/tests/rustdoc-json/primitives/use_primitive.rs b/tests/rustdoc-json/primitives/use_primitive.rs index f8118b82094e..7f5ffc043093 100644 --- a/tests/rustdoc-json/primitives/use_primitive.rs +++ b/tests/rustdoc-json/primitives/use_primitive.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(rustc_attrs)] diff --git a/tests/rustdoc-json/reexport/doc_inline_external_crate.rs b/tests/rustdoc-json/reexport/doc_inline_external_crate.rs index 1c5fed8c6b2b..7326649d9042 100644 --- a/tests/rustdoc-json/reexport/doc_inline_external_crate.rs +++ b/tests/rustdoc-json/reexport/doc_inline_external_crate.rs @@ -1,5 +1,5 @@ // Regression Test for https://github.com/rust-lang/rust/issues/110138 -// aux-build: enum_with_discriminant.rs +//@ aux-build: enum_with_discriminant.rs // ignore-tidy-linelength #[doc(inline)] diff --git a/tests/rustdoc-json/reexport/extern_crate_glob.rs b/tests/rustdoc-json/reexport/extern_crate_glob.rs index 553ee79b44e4..07497f6d7be4 100644 --- a/tests/rustdoc-json/reexport/extern_crate_glob.rs +++ b/tests/rustdoc-json/reexport/extern_crate_glob.rs @@ -1,4 +1,4 @@ -// aux-build: enum_with_discriminant.rs +//@ aux-build: enum_with_discriminant.rs extern crate enum_with_discriminant; diff --git a/tests/rustdoc-json/reexport/glob_extern.rs b/tests/rustdoc-json/reexport/glob_extern.rs index ed0c4a420d48..b95765410d52 100644 --- a/tests/rustdoc-json/reexport/glob_extern.rs +++ b/tests/rustdoc-json/reexport/glob_extern.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // @is "$.index[*][?(@.name=='mod1')].inner.module.is_stripped" "true" mod mod1 { diff --git a/tests/rustdoc-json/reexport/glob_private.rs b/tests/rustdoc-json/reexport/glob_private.rs index 11ea5aa3522b..9764b4046828 100644 --- a/tests/rustdoc-json/reexport/glob_private.rs +++ b/tests/rustdoc-json/reexport/glob_private.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // @is "$.index[*][?(@.name=='mod1')].inner.module.is_stripped" "true" mod mod1 { diff --git a/tests/rustdoc-json/reexport/macro.rs b/tests/rustdoc-json/reexport/macro.rs index be09cb47629d..2cca238908e6 100644 --- a/tests/rustdoc-json/reexport/macro.rs +++ b/tests/rustdoc-json/reexport/macro.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // @set repro_id = "$.index[*][?(@.name=='repro')].id" #[macro_export] diff --git a/tests/rustdoc-json/reexport/private_twice_one_inline.rs b/tests/rustdoc-json/reexport/private_twice_one_inline.rs index d7b766235578..5e6a10af5299 100644 --- a/tests/rustdoc-json/reexport/private_twice_one_inline.rs +++ b/tests/rustdoc-json/reexport/private_twice_one_inline.rs @@ -1,4 +1,4 @@ -// aux-build:pub-struct.rs +//@ aux-build:pub-struct.rs // ignore-tidy-linelength // Test for the ICE in https://github.com/rust-lang/rust/issues/83057 diff --git a/tests/rustdoc-json/reexport/reexport_of_hidden.rs b/tests/rustdoc-json/reexport/reexport_of_hidden.rs index 1b6ff5fadca1..62c1dbff2789 100644 --- a/tests/rustdoc-json/reexport/reexport_of_hidden.rs +++ b/tests/rustdoc-json/reexport/reexport_of_hidden.rs @@ -1,4 +1,4 @@ -// compile-flags: --document-hidden-items +//@ compile-flags: --document-hidden-items // @has "$.index[*].inner[?(@.import.name=='UsedHidden')]" // @has "$.index[*][?(@.name=='Hidden')]" diff --git a/tests/rustdoc-json/reexport/rename_private.rs b/tests/rustdoc-json/reexport/rename_private.rs index 3924282a49e5..433829bab308 100644 --- a/tests/rustdoc-json/reexport/rename_private.rs +++ b/tests/rustdoc-json/reexport/rename_private.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // @!has "$.index[*][?(@.name=='inner')]" mod inner { diff --git a/tests/rustdoc-json/reexport/rename_public.rs b/tests/rustdoc-json/reexport/rename_public.rs index 636937874483..ebfa3d9f1769 100644 --- a/tests/rustdoc-json/reexport/rename_public.rs +++ b/tests/rustdoc-json/reexport/rename_public.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // @set inner_id = "$.index[*][?(@.name=='inner')].id" pub mod inner { diff --git a/tests/rustdoc-json/reexport/simple_private.rs b/tests/rustdoc-json/reexport/simple_private.rs index 2ca8c7fa6be6..7b6509abc8dd 100644 --- a/tests/rustdoc-json/reexport/simple_private.rs +++ b/tests/rustdoc-json/reexport/simple_private.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // @!has "$.index[*][?(@.name=='inner')]" mod inner { diff --git a/tests/rustdoc-json/reexport/simple_public.rs b/tests/rustdoc-json/reexport/simple_public.rs index 04611eeb95ca..55d32b99951a 100644 --- a/tests/rustdoc-json/reexport/simple_public.rs +++ b/tests/rustdoc-json/reexport/simple_public.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // @set inner_id = "$.index[*][?(@.name=='inner')].id" pub mod inner { diff --git a/tests/rustdoc-json/reexport/synthesize_trait_with_docs.rs b/tests/rustdoc-json/reexport/synthesize_trait_with_docs.rs index 25a7c08d6892..de67badffd53 100644 --- a/tests/rustdoc-json/reexport/synthesize_trait_with_docs.rs +++ b/tests/rustdoc-json/reexport/synthesize_trait_with_docs.rs @@ -1,5 +1,5 @@ // Regression test for -// aux-build: trait_with_docs.rs +//@ aux-build: trait_with_docs.rs extern crate trait_with_docs; diff --git a/tests/rustdoc-ui/ambiguous-inherent-assoc-ty.rs b/tests/rustdoc-ui/ambiguous-inherent-assoc-ty.rs index 94ea0e93bf63..47e431d5cf1b 100644 --- a/tests/rustdoc-ui/ambiguous-inherent-assoc-ty.rs +++ b/tests/rustdoc-ui/ambiguous-inherent-assoc-ty.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // This test ensures that rustdoc does not panic on inherented associated types // that are referred to without fully-qualified syntax. diff --git a/tests/rustdoc-ui/apit-46976.rs b/tests/rustdoc-ui/apit-46976.rs index c17688e3b1d7..515b5af9465d 100644 --- a/tests/rustdoc-ui/apit-46976.rs +++ b/tests/rustdoc-ui/apit-46976.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // https://github.com/rust-lang/rust/issues/46976 pub fn ice(f: impl Fn()) {} diff --git a/tests/rustdoc-ui/auxiliary/panic-item.rs b/tests/rustdoc-ui/auxiliary/panic-item.rs index 17b26850d4d2..ccf784f72842 100644 --- a/tests/rustdoc-ui/auxiliary/panic-item.rs +++ b/tests/rustdoc-ui/auxiliary/panic-item.rs @@ -1,4 +1,4 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic #![crate_type = "lib"] #![no_std] #![feature(lang_items)] diff --git a/tests/rustdoc-ui/check-cfg/check-cfg-unstable.rs b/tests/rustdoc-ui/check-cfg/check-cfg-unstable.rs index 806b6d1253da..b24b198e807a 100644 --- a/tests/rustdoc-ui/check-cfg/check-cfg-unstable.rs +++ b/tests/rustdoc-ui/check-cfg/check-cfg-unstable.rs @@ -1,2 +1,2 @@ -// check-fail -// compile-flags: --check-cfg=cfg() +//@ check-fail +//@ compile-flags: --check-cfg=cfg() diff --git a/tests/rustdoc-ui/check-cfg/check-cfg.rs b/tests/rustdoc-ui/check-cfg/check-cfg.rs index 96fa9e08ddee..27b09985728d 100644 --- a/tests/rustdoc-ui/check-cfg/check-cfg.rs +++ b/tests/rustdoc-ui/check-cfg/check-cfg.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: --check-cfg=cfg() -Z unstable-options +//@ check-pass +//@ compile-flags: --check-cfg=cfg() -Z unstable-options /// uniz is nor a builtin nor pass as arguments so is unexpected #[cfg(uniz)] diff --git a/tests/rustdoc-ui/circular-intra-doc-link-48414.rs b/tests/rustdoc-ui/circular-intra-doc-link-48414.rs index 46367ccaef9a..23dc072c6a2d 100644 --- a/tests/rustdoc-ui/circular-intra-doc-link-48414.rs +++ b/tests/rustdoc-ui/circular-intra-doc-link-48414.rs @@ -1,5 +1,5 @@ -// aux-build:issue-48414.rs -// check-pass +//@ aux-build:issue-48414.rs +//@ check-pass // https://github.com/rust-lang/rust/issues/48414 diff --git a/tests/rustdoc-ui/commandline-argfile-badutf8.rs b/tests/rustdoc-ui/commandline-argfile-badutf8.rs index e2984e3ca97a..b3a19fa62741 100644 --- a/tests/rustdoc-ui/commandline-argfile-badutf8.rs +++ b/tests/rustdoc-ui/commandline-argfile-badutf8.rs @@ -1,6 +1,6 @@ // Check to see if we can get parameters from an @argsfile file // -// compile-flags: --cfg cmdline_set @{{src-base}}/commandline-argfile-badutf8.args +//@ compile-flags: --cfg cmdline_set @{{src-base}}/commandline-argfile-badutf8.args #[cfg(not(cmdline_set))] compile_error!("cmdline_set not set"); diff --git a/tests/rustdoc-ui/commandline-argfile-missing.rs b/tests/rustdoc-ui/commandline-argfile-missing.rs index 5a6465bd0646..bb9644d66ce1 100644 --- a/tests/rustdoc-ui/commandline-argfile-missing.rs +++ b/tests/rustdoc-ui/commandline-argfile-missing.rs @@ -1,8 +1,8 @@ // Check to see if we can get parameters from an @argsfile file // -// normalize-stderr-test: "os error \d+" -> "os error $$ERR" -// normalize-stderr-test: "commandline-argfile-missing.args:[^(]*" -> "commandline-argfile-missing.args: $$FILE_MISSING " -// compile-flags: --cfg cmdline_set @{{src-base}}/commandline-argfile-missing.args +//@ normalize-stderr-test: "os error \d+" -> "os error $$ERR" +//@ normalize-stderr-test: "commandline-argfile-missing.args:[^(]*" -> "commandline-argfile-missing.args: $$FILE_MISSING " +//@ compile-flags: --cfg cmdline_set @{{src-base}}/commandline-argfile-missing.args #[cfg(not(cmdline_set))] compile_error!("cmdline_set not set"); diff --git a/tests/rustdoc-ui/commandline-argfile.rs b/tests/rustdoc-ui/commandline-argfile.rs index cc8c8722c1c3..d71bc72562b7 100644 --- a/tests/rustdoc-ui/commandline-argfile.rs +++ b/tests/rustdoc-ui/commandline-argfile.rs @@ -1,7 +1,7 @@ // Check to see if we can get parameters from an @argsfile file // -// check-pass -// compile-flags: --cfg cmdline_set @{{src-base}}/commandline-argfile.args +//@ check-pass +//@ compile-flags: --cfg cmdline_set @{{src-base}}/commandline-argfile.args #[cfg(not(cmdline_set))] compile_error!("cmdline_set not set"); diff --git a/tests/rustdoc-ui/coverage/allow_missing_docs.rs b/tests/rustdoc-ui/coverage/allow_missing_docs.rs index c771c09da883..43f0d731fdea 100644 --- a/tests/rustdoc-ui/coverage/allow_missing_docs.rs +++ b/tests/rustdoc-ui/coverage/allow_missing_docs.rs @@ -1,5 +1,5 @@ -// compile-flags:-Z unstable-options --show-coverage -// check-pass +//@ compile-flags:-Z unstable-options --show-coverage +//@ check-pass //! Make sure to have some docs on your crate root diff --git a/tests/rustdoc-ui/coverage/basic.rs b/tests/rustdoc-ui/coverage/basic.rs index 6c26b751c5e0..febcc80fbbb5 100644 --- a/tests/rustdoc-ui/coverage/basic.rs +++ b/tests/rustdoc-ui/coverage/basic.rs @@ -1,5 +1,5 @@ -// compile-flags:-Z unstable-options --show-coverage -// check-pass +//@ compile-flags:-Z unstable-options --show-coverage +//@ check-pass #![feature(extern_types)] diff --git a/tests/rustdoc-ui/coverage/doc-examples-json.rs b/tests/rustdoc-ui/coverage/doc-examples-json.rs index 1da1813790e8..4aa4bf23771d 100644 --- a/tests/rustdoc-ui/coverage/doc-examples-json.rs +++ b/tests/rustdoc-ui/coverage/doc-examples-json.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags:-Z unstable-options --output-format json --show-coverage +//@ check-pass +//@ compile-flags:-Z unstable-options --output-format json --show-coverage // This check ensures that only one doc example is counted since they're "optional" on // certain items. diff --git a/tests/rustdoc-ui/coverage/doc-examples.rs b/tests/rustdoc-ui/coverage/doc-examples.rs index cd718f8a34d1..283d9c424aa1 100644 --- a/tests/rustdoc-ui/coverage/doc-examples.rs +++ b/tests/rustdoc-ui/coverage/doc-examples.rs @@ -1,5 +1,5 @@ -// compile-flags:-Z unstable-options --show-coverage -// check-pass +//@ compile-flags:-Z unstable-options --show-coverage +//@ check-pass //! This test ensure that only rust code examples are counted. diff --git a/tests/rustdoc-ui/coverage/empty.rs b/tests/rustdoc-ui/coverage/empty.rs index 55a87e9d97b3..bcd3e48988b1 100644 --- a/tests/rustdoc-ui/coverage/empty.rs +++ b/tests/rustdoc-ui/coverage/empty.rs @@ -1,4 +1,4 @@ -// compile-flags:-Z unstable-options --show-coverage -// check-pass +//@ compile-flags:-Z unstable-options --show-coverage +//@ check-pass // an empty crate still has one item to document: the crate root diff --git a/tests/rustdoc-ui/coverage/enum-tuple-documented.rs b/tests/rustdoc-ui/coverage/enum-tuple-documented.rs index e9c165b1916e..4cbeb7a164da 100644 --- a/tests/rustdoc-ui/coverage/enum-tuple-documented.rs +++ b/tests/rustdoc-ui/coverage/enum-tuple-documented.rs @@ -1,5 +1,5 @@ -// compile-flags:-Z unstable-options --show-coverage -// check-pass +//@ compile-flags:-Z unstable-options --show-coverage +//@ check-pass // The point of this test is to ensure that the number of "documented" items // is higher than in `enum-tuple.rs`. diff --git a/tests/rustdoc-ui/coverage/enum-tuple.rs b/tests/rustdoc-ui/coverage/enum-tuple.rs index 5fb205450755..5cbc52a7d033 100644 --- a/tests/rustdoc-ui/coverage/enum-tuple.rs +++ b/tests/rustdoc-ui/coverage/enum-tuple.rs @@ -1,5 +1,5 @@ -// compile-flags:-Z unstable-options --show-coverage -// check-pass +//@ compile-flags:-Z unstable-options --show-coverage +//@ check-pass //! (remember the crate root is still a module) diff --git a/tests/rustdoc-ui/coverage/enums.rs b/tests/rustdoc-ui/coverage/enums.rs index a4ae36d6837a..29e419845761 100644 --- a/tests/rustdoc-ui/coverage/enums.rs +++ b/tests/rustdoc-ui/coverage/enums.rs @@ -1,5 +1,5 @@ -// compile-flags:-Z unstable-options --show-coverage -// check-pass +//@ compile-flags:-Z unstable-options --show-coverage +//@ check-pass //! (remember the crate root is still a module) diff --git a/tests/rustdoc-ui/coverage/exotic.rs b/tests/rustdoc-ui/coverage/exotic.rs index f45405fbf5dc..9fc1498cb2a3 100644 --- a/tests/rustdoc-ui/coverage/exotic.rs +++ b/tests/rustdoc-ui/coverage/exotic.rs @@ -1,5 +1,5 @@ -// compile-flags:-Z unstable-options --show-coverage -// check-pass +//@ compile-flags:-Z unstable-options --show-coverage +//@ check-pass #![feature(rustdoc_internals)] #![feature(rustc_attrs)] diff --git a/tests/rustdoc-ui/coverage/html.rs b/tests/rustdoc-ui/coverage/html.rs index 181cb4c5061a..41e1ce1609dc 100644 --- a/tests/rustdoc-ui/coverage/html.rs +++ b/tests/rustdoc-ui/coverage/html.rs @@ -1,4 +1,4 @@ -// compile-flags:-Z unstable-options --output-format html --show-coverage +//@ compile-flags:-Z unstable-options --output-format html --show-coverage /// Foo pub struct Xo; diff --git a/tests/rustdoc-ui/coverage/json.rs b/tests/rustdoc-ui/coverage/json.rs index a591cd5dba40..bfa8dc700830 100644 --- a/tests/rustdoc-ui/coverage/json.rs +++ b/tests/rustdoc-ui/coverage/json.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags:-Z unstable-options --output-format json --show-coverage +//@ check-pass +//@ compile-flags:-Z unstable-options --output-format json --show-coverage pub mod foo { /// Hello! diff --git a/tests/rustdoc-ui/coverage/private.rs b/tests/rustdoc-ui/coverage/private.rs index 2a0271727f26..91490eff7a8d 100644 --- a/tests/rustdoc-ui/coverage/private.rs +++ b/tests/rustdoc-ui/coverage/private.rs @@ -1,5 +1,5 @@ -// compile-flags:-Z unstable-options --show-coverage --document-private-items -// check-pass +//@ compile-flags:-Z unstable-options --show-coverage --document-private-items +//@ check-pass #![allow(unused)] diff --git a/tests/rustdoc-ui/coverage/statics-consts.rs b/tests/rustdoc-ui/coverage/statics-consts.rs index 5a35260fa358..85cc23847396 100644 --- a/tests/rustdoc-ui/coverage/statics-consts.rs +++ b/tests/rustdoc-ui/coverage/statics-consts.rs @@ -1,5 +1,5 @@ -// compile-flags:-Z unstable-options --show-coverage -// check-pass +//@ compile-flags:-Z unstable-options --show-coverage +//@ check-pass //! gotta make sure we can count statics and consts correctly, too diff --git a/tests/rustdoc-ui/coverage/traits.rs b/tests/rustdoc-ui/coverage/traits.rs index daa08ec25823..89044369e6a7 100644 --- a/tests/rustdoc-ui/coverage/traits.rs +++ b/tests/rustdoc-ui/coverage/traits.rs @@ -1,5 +1,5 @@ -// compile-flags:-Z unstable-options --show-coverage -// check-pass +//@ compile-flags:-Z unstable-options --show-coverage +//@ check-pass #![feature(trait_alias)] #![feature(type_alias_impl_trait)] diff --git a/tests/rustdoc-ui/crate-reference-in-block-module.rs b/tests/rustdoc-ui/crate-reference-in-block-module.rs index aede030e072b..e27c48568671 100644 --- a/tests/rustdoc-ui/crate-reference-in-block-module.rs +++ b/tests/rustdoc-ui/crate-reference-in-block-module.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { /// [](crate) struct X; diff --git a/tests/rustdoc-ui/deprecated-attrs.rs b/tests/rustdoc-ui/deprecated-attrs.rs index 4f6a14fc2c26..e4802ee25182 100644 --- a/tests/rustdoc-ui/deprecated-attrs.rs +++ b/tests/rustdoc-ui/deprecated-attrs.rs @@ -1,6 +1,6 @@ -// check-pass -// compile-flags: --passes unknown-pass -// error-pattern: the `passes` flag no longer functions +//@ check-pass +//@ compile-flags: --passes unknown-pass +//@ error-pattern: the `passes` flag no longer functions #![doc(no_default_passes)] //~^ WARNING attribute is deprecated diff --git a/tests/rustdoc-ui/deref-generic.rs b/tests/rustdoc-ui/deref-generic.rs index bc64beb1b939..51d6dc3db37b 100644 --- a/tests/rustdoc-ui/deref-generic.rs +++ b/tests/rustdoc-ui/deref-generic.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // #81395: Fix ICE when recursing into Deref target only differing in type args pub struct Generic(T); diff --git a/tests/rustdoc-ui/diagnostic-width.rs b/tests/rustdoc-ui/diagnostic-width.rs index 290d9db775b7..e255496f02e4 100644 --- a/tests/rustdoc-ui/diagnostic-width.rs +++ b/tests/rustdoc-ui/diagnostic-width.rs @@ -1,4 +1,4 @@ -// compile-flags: --diagnostic-width=10 +//@ compile-flags: --diagnostic-width=10 #![deny(rustdoc::bare_urls)] /// This is a long line that contains a http://link.com diff --git a/tests/rustdoc-ui/doc-include-suggestion.rs b/tests/rustdoc-ui/doc-include-suggestion.rs index 0c0100735514..5c8d1efa76fe 100644 --- a/tests/rustdoc-ui/doc-include-suggestion.rs +++ b/tests/rustdoc-ui/doc-include-suggestion.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #[doc(include = "external-cross-doc.md")] //~^ WARNING unknown `doc` attribute `include` diff --git a/tests/rustdoc-ui/doctest/block-doc-comment.rs b/tests/rustdoc-ui/doctest/block-doc-comment.rs index ce529916e5ed..fdb500a8bdfa 100644 --- a/tests/rustdoc-ui/doctest/block-doc-comment.rs +++ b/tests/rustdoc-ui/doctest/block-doc-comment.rs @@ -1,6 +1,6 @@ -// check-pass -// compile-flags:--test -// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ check-pass +//@ compile-flags:--test +//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" // This test ensures that no code block is detected in the doc comments. diff --git a/tests/rustdoc-ui/doctest/cfg-test.rs b/tests/rustdoc-ui/doctest/cfg-test.rs index a263baa9738c..3b01f8bd0d0a 100644 --- a/tests/rustdoc-ui/doctest/cfg-test.rs +++ b/tests/rustdoc-ui/doctest/cfg-test.rs @@ -1,7 +1,7 @@ -// check-pass -// compile-flags:--test --test-args --test-threads=1 -// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ check-pass +//@ compile-flags:--test --test-args --test-threads=1 +//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" // Crates like core have doctests gated on `cfg(not(test))` so we need to make // sure `cfg(test)` is not active when running `rustdoc --test`. diff --git a/tests/rustdoc-ui/doctest/check-attr-test.rs b/tests/rustdoc-ui/doctest/check-attr-test.rs index e955470148a1..81281db624b3 100644 --- a/tests/rustdoc-ui/doctest/check-attr-test.rs +++ b/tests/rustdoc-ui/doctest/check-attr-test.rs @@ -1,4 +1,4 @@ -// compile-flags:--test +//@ compile-flags:--test #![deny(rustdoc::invalid_codeblock_attributes)] diff --git a/tests/rustdoc-ui/doctest/check-cfg-test.rs b/tests/rustdoc-ui/doctest/check-cfg-test.rs index 38cd59aa790d..c96f0c35333f 100644 --- a/tests/rustdoc-ui/doctest/check-cfg-test.rs +++ b/tests/rustdoc-ui/doctest/check-cfg-test.rs @@ -1,8 +1,8 @@ -// check-pass -// compile-flags: --test --nocapture --check-cfg=cfg(feature,values("test")) -Z unstable-options -// normalize-stderr-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ check-pass +//@ compile-flags: --test --nocapture --check-cfg=cfg(feature,values("test")) -Z unstable-options +//@ normalize-stderr-test: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" /// The doctest will produce a warning because feature invalid is unexpected /// ``` diff --git a/tests/rustdoc-ui/doctest/display-output.rs b/tests/rustdoc-ui/doctest/display-output.rs index 7a26dbff9861..080d34398a56 100644 --- a/tests/rustdoc-ui/doctest/display-output.rs +++ b/tests/rustdoc-ui/doctest/display-output.rs @@ -1,10 +1,10 @@ // Test that `--show-output` has an effect and `allow(unused)` can be overridden. -// check-pass -// edition:2018 -// compile-flags:--test --test-args=--show-output -// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ check-pass +//@ edition:2018 +//@ compile-flags:--test --test-args=--show-output +//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" /// ``` /// #![warn(unused)] diff --git a/tests/rustdoc-ui/doctest/doc-comment-multi-line-attr.rs b/tests/rustdoc-ui/doctest/doc-comment-multi-line-attr.rs index 75508f435b3c..c09796df6f1d 100644 --- a/tests/rustdoc-ui/doctest/doc-comment-multi-line-attr.rs +++ b/tests/rustdoc-ui/doctest/doc-comment-multi-line-attr.rs @@ -1,8 +1,8 @@ // Regression test for #97440: Multiline inner attribute triggers ICE during doctest -// compile-flags:--test -// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" -// check-pass +//@ compile-flags:--test +//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ check-pass //! ```rust //! #![deny( diff --git a/tests/rustdoc-ui/doctest/doc-comment-multi-line-cfg-attr.rs b/tests/rustdoc-ui/doctest/doc-comment-multi-line-cfg-attr.rs index 3b0b27edb7d0..832f720ef3f6 100644 --- a/tests/rustdoc-ui/doctest/doc-comment-multi-line-cfg-attr.rs +++ b/tests/rustdoc-ui/doctest/doc-comment-multi-line-cfg-attr.rs @@ -1,7 +1,7 @@ -// compile-flags:--test -// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" -// check-pass +//@ compile-flags:--test +//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ check-pass /// ``` /// # #![cfg_attr(not(dox), deny(missing_abi, diff --git a/tests/rustdoc-ui/doctest/doc-test-attr-pass.rs b/tests/rustdoc-ui/doctest/doc-test-attr-pass.rs index 12608f244507..edbfde90bcef 100644 --- a/tests/rustdoc-ui/doctest/doc-test-attr-pass.rs +++ b/tests/rustdoc-ui/doctest/doc-test-attr-pass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![crate_type = "lib"] #![deny(invalid_doc_attributes)] diff --git a/tests/rustdoc-ui/doctest/doc-test-doctest-feature.rs b/tests/rustdoc-ui/doctest/doc-test-doctest-feature.rs index 9c1f4936eab3..2bec9414f1d7 100644 --- a/tests/rustdoc-ui/doctest/doc-test-doctest-feature.rs +++ b/tests/rustdoc-ui/doctest/doc-test-doctest-feature.rs @@ -1,7 +1,7 @@ -// check-pass -// compile-flags:--test -// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ check-pass +//@ compile-flags:--test +//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" // Make sure `cfg(doctest)` is set when finding doctests but not inside // the doctests. diff --git a/tests/rustdoc-ui/doctest/doc-test-rustdoc-feature.rs b/tests/rustdoc-ui/doctest/doc-test-rustdoc-feature.rs index 1f90d13af84f..765bbd244a60 100644 --- a/tests/rustdoc-ui/doctest/doc-test-rustdoc-feature.rs +++ b/tests/rustdoc-ui/doctest/doc-test-rustdoc-feature.rs @@ -1,7 +1,7 @@ -// check-pass -// compile-flags:--test -// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ check-pass +//@ compile-flags:--test +//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" #![feature(doc_cfg)] diff --git a/tests/rustdoc-ui/doctest/doctest-edition.rs b/tests/rustdoc-ui/doctest/doctest-edition.rs index b0787be972f2..008c84f71623 100644 --- a/tests/rustdoc-ui/doctest/doctest-edition.rs +++ b/tests/rustdoc-ui/doctest/doctest-edition.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![deny(rustdoc::invalid_rust_codeblocks)] //~^ NOTE lint level is defined here diff --git a/tests/rustdoc-ui/doctest/doctest-multiline-crate-attribute.rs b/tests/rustdoc-ui/doctest/doctest-multiline-crate-attribute.rs index a3bde6cb9410..c626c3b62610 100644 --- a/tests/rustdoc-ui/doctest/doctest-multiline-crate-attribute.rs +++ b/tests/rustdoc-ui/doctest/doctest-multiline-crate-attribute.rs @@ -1,7 +1,7 @@ -// compile-flags:--test --test-args=--test-threads=1 -// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" -// check-pass +//@ compile-flags:--test --test-args=--test-threads=1 +//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ check-pass /// ``` /// #![deprecated(since = "5.2", note = "foo was rarely used. \ diff --git a/tests/rustdoc-ui/doctest/doctest-output.rs b/tests/rustdoc-ui/doctest/doctest-output.rs index 26754b73f0bc..0bd032669f8e 100644 --- a/tests/rustdoc-ui/doctest/doctest-output.rs +++ b/tests/rustdoc-ui/doctest/doctest-output.rs @@ -1,9 +1,9 @@ -// edition:2018 -// aux-build:extern_macros.rs -// compile-flags:--test --test-args=--test-threads=1 -// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" -// check-pass +//@ edition:2018 +//@ aux-build:extern_macros.rs +//@ compile-flags:--test --test-args=--test-threads=1 +//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ check-pass //! ``` //! assert_eq!(1 + 1, 2); diff --git a/tests/rustdoc-ui/doctest/failed-doctest-compile-fail.rs b/tests/rustdoc-ui/doctest/failed-doctest-compile-fail.rs index 53b3857dfde6..5e79ee04687a 100644 --- a/tests/rustdoc-ui/doctest/failed-doctest-compile-fail.rs +++ b/tests/rustdoc-ui/doctest/failed-doctest-compile-fail.rs @@ -1,10 +1,10 @@ // FIXME: if/when the output of the test harness can be tested on its own, this test should be // adapted to use that, and that normalize line can go away -// compile-flags:--test -// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" -// failure-status: 101 +//@ compile-flags:--test +//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ failure-status: 101 /// ```compile_fail /// println!("Hello"); diff --git a/tests/rustdoc-ui/doctest/failed-doctest-extra-semicolon-on-item.rs b/tests/rustdoc-ui/doctest/failed-doctest-extra-semicolon-on-item.rs index 84e4d61603ae..bedb2ac64dba 100644 --- a/tests/rustdoc-ui/doctest/failed-doctest-extra-semicolon-on-item.rs +++ b/tests/rustdoc-ui/doctest/failed-doctest-extra-semicolon-on-item.rs @@ -1,10 +1,10 @@ // FIXME: if/when the output of the test harness can be tested on its own, this test should be // adapted to use that, and that normalize line can go away -// compile-flags:--test -// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" -// failure-status: 101 +//@ compile-flags:--test +//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ failure-status: 101 /// /// diff --git a/tests/rustdoc-ui/doctest/failed-doctest-missing-codes.rs b/tests/rustdoc-ui/doctest/failed-doctest-missing-codes.rs index 4e3b848fc02b..70db072f7266 100644 --- a/tests/rustdoc-ui/doctest/failed-doctest-missing-codes.rs +++ b/tests/rustdoc-ui/doctest/failed-doctest-missing-codes.rs @@ -1,10 +1,10 @@ // FIXME: if/when the output of the test harness can be tested on its own, this test should be // adapted to use that, and that normalize line can go away -// compile-flags:--test -// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" -// failure-status: 101 +//@ compile-flags:--test +//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ failure-status: 101 /// ```compile_fail,E0004 /// let x: () = 5i32; diff --git a/tests/rustdoc-ui/doctest/failed-doctest-output-windows.rs b/tests/rustdoc-ui/doctest/failed-doctest-output-windows.rs index 6bc6c33c76ec..5e1ecf82f582 100644 --- a/tests/rustdoc-ui/doctest/failed-doctest-output-windows.rs +++ b/tests/rustdoc-ui/doctest/failed-doctest-output-windows.rs @@ -1,15 +1,15 @@ -// only-windows +//@ only-windows // There's a parallel generic version of this test for non-windows platforms. // Issue #51162: A failed doctest was not printing its stdout/stderr // FIXME: if/when the output of the test harness can be tested on its own, this test should be // adapted to use that, and that normalize line can go away -// compile-flags:--test --test-args --test-threads=1 -// rustc-env:RUST_BACKTRACE=0 -// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" -// failure-status: 101 +//@ compile-flags:--test --test-args --test-threads=1 +//@ rustc-env:RUST_BACKTRACE=0 +//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ failure-status: 101 // doctest fails at runtime /// ``` diff --git a/tests/rustdoc-ui/doctest/failed-doctest-output.rs b/tests/rustdoc-ui/doctest/failed-doctest-output.rs index 3e1312382ee8..d4d49b73793e 100644 --- a/tests/rustdoc-ui/doctest/failed-doctest-output.rs +++ b/tests/rustdoc-ui/doctest/failed-doctest-output.rs @@ -1,15 +1,15 @@ -// ignore-windows +//@ ignore-windows // There's a parallel version of this test for Windows. // Issue #51162: A failed doctest was not printing its stdout/stderr // FIXME: if/when the output of the test harness can be tested on its own, this test should be // adapted to use that, and that normalize line can go away -// compile-flags:--test --test-args --test-threads=1 -// rustc-env:RUST_BACKTRACE=0 -// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" -// failure-status: 101 +//@ compile-flags:--test --test-args --test-threads=1 +//@ rustc-env:RUST_BACKTRACE=0 +//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ failure-status: 101 // doctest fails at runtime /// ``` diff --git a/tests/rustdoc-ui/doctest/failed-doctest-should-panic.rs b/tests/rustdoc-ui/doctest/failed-doctest-should-panic.rs index 36284e814f3c..6426fd353a7f 100644 --- a/tests/rustdoc-ui/doctest/failed-doctest-should-panic.rs +++ b/tests/rustdoc-ui/doctest/failed-doctest-should-panic.rs @@ -1,10 +1,10 @@ // FIXME: if/when the output of the test harness can be tested on its own, this test should be // adapted to use that, and that normalize line can go away -// compile-flags:--test -// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" -// failure-status: 101 +//@ compile-flags:--test +//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ failure-status: 101 /// ```should_panic /// println!("Hello, world!"); diff --git a/tests/rustdoc-ui/doctest/no-run-flag-error.rs b/tests/rustdoc-ui/doctest/no-run-flag-error.rs index 4ead621482bf..896d7729b8df 100644 --- a/tests/rustdoc-ui/doctest/no-run-flag-error.rs +++ b/tests/rustdoc-ui/doctest/no-run-flag-error.rs @@ -1,6 +1,6 @@ // test the behavior of the --no-run flag without the --test flag -// compile-flags:-Z unstable-options --no-run --test-args=--test-threads=1 -// error-pattern: the `--test` flag must be passed +//@ compile-flags:-Z unstable-options --no-run --test-args=--test-threads=1 +//@ error-pattern: the `--test` flag must be passed pub fn f() {} diff --git a/tests/rustdoc-ui/doctest/no-run-flag.rs b/tests/rustdoc-ui/doctest/no-run-flag.rs index 1cf3b7c4bb3d..bdb977b5504d 100644 --- a/tests/rustdoc-ui/doctest/no-run-flag.rs +++ b/tests/rustdoc-ui/doctest/no-run-flag.rs @@ -1,9 +1,9 @@ // test the behavior of the --no-run flag -// check-pass -// compile-flags:-Z unstable-options --test --no-run --test-args=--test-threads=1 -// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ check-pass +//@ compile-flags:-Z unstable-options --test --no-run --test-args=--test-threads=1 +//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" /// ``` /// let a = true; diff --git a/tests/rustdoc-ui/doctest/nocapture-fail.rs b/tests/rustdoc-ui/doctest/nocapture-fail.rs index ce487a43db41..9c225174270c 100644 --- a/tests/rustdoc-ui/doctest/nocapture-fail.rs +++ b/tests/rustdoc-ui/doctest/nocapture-fail.rs @@ -1,8 +1,8 @@ -// check-pass -// compile-flags:--test -Zunstable-options --nocapture -// normalize-stderr-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ check-pass +//@ compile-flags:--test -Zunstable-options --nocapture +//@ normalize-stderr-test: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" /// ```compile_fail /// fn foo() { diff --git a/tests/rustdoc-ui/doctest/nocapture.rs b/tests/rustdoc-ui/doctest/nocapture.rs index 25fbcf857e25..39785286fb17 100644 --- a/tests/rustdoc-ui/doctest/nocapture.rs +++ b/tests/rustdoc-ui/doctest/nocapture.rs @@ -1,7 +1,7 @@ -// check-pass -// compile-flags:--test -Zunstable-options --nocapture -// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ check-pass +//@ compile-flags:--test -Zunstable-options --nocapture +//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" /// ``` /// println!("hello!"); diff --git a/tests/rustdoc-ui/doctest/private-doc-test.rs b/tests/rustdoc-ui/doctest/private-doc-test.rs index a1f9f8dca083..911cbdbb89da 100644 --- a/tests/rustdoc-ui/doctest/private-doc-test.rs +++ b/tests/rustdoc-ui/doctest/private-doc-test.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(rustdoc::private_doc_tests)] diff --git a/tests/rustdoc-ui/doctest/public-reexported-item-doc-test.rs b/tests/rustdoc-ui/doctest/public-reexported-item-doc-test.rs index b86a53305a17..e786c03470b7 100644 --- a/tests/rustdoc-ui/doctest/public-reexported-item-doc-test.rs +++ b/tests/rustdoc-ui/doctest/public-reexported-item-doc-test.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(rustdoc::private_doc_tests)] diff --git a/tests/rustdoc-ui/doctest/run-directory.rs b/tests/rustdoc-ui/doctest/run-directory.rs index 1ff0af2d17cb..2fc18470133c 100644 --- a/tests/rustdoc-ui/doctest/run-directory.rs +++ b/tests/rustdoc-ui/doctest/run-directory.rs @@ -1,11 +1,11 @@ // this test asserts that the cwd of doctest invocations is set correctly. -// revisions: correct incorrect -// check-pass -// [correct]compile-flags:--test --test-run-directory={{src-base}} -// [incorrect]compile-flags:--test --test-run-directory={{src-base}}/coverage -// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ revisions: correct incorrect +//@ check-pass +//@ [correct]compile-flags:--test --test-run-directory={{src-base}} +//@ [incorrect]compile-flags:--test --test-run-directory={{src-base}}/coverage +//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" /// ``` /// assert_eq!( diff --git a/tests/rustdoc-ui/doctest/test-compile-fail1.rs b/tests/rustdoc-ui/doctest/test-compile-fail1.rs index a05390238784..278f01f4c838 100644 --- a/tests/rustdoc-ui/doctest/test-compile-fail1.rs +++ b/tests/rustdoc-ui/doctest/test-compile-fail1.rs @@ -1,4 +1,4 @@ -// compile-flags:--test +//@ compile-flags:--test /// ``` /// assert!(true) diff --git a/tests/rustdoc-ui/doctest/test-compile-fail2.rs b/tests/rustdoc-ui/doctest/test-compile-fail2.rs index 651ded0a0479..7432cc9f8263 100644 --- a/tests/rustdoc-ui/doctest/test-compile-fail2.rs +++ b/tests/rustdoc-ui/doctest/test-compile-fail2.rs @@ -1,3 +1,3 @@ -// compile-flags:--test +//@ compile-flags:--test fail diff --git a/tests/rustdoc-ui/doctest/test-compile-fail3.rs b/tests/rustdoc-ui/doctest/test-compile-fail3.rs index faa30ad83671..a2486d9dc6f2 100644 --- a/tests/rustdoc-ui/doctest/test-compile-fail3.rs +++ b/tests/rustdoc-ui/doctest/test-compile-fail3.rs @@ -1,3 +1,3 @@ -// compile-flags:--test +//@ compile-flags:--test "fail diff --git a/tests/rustdoc-ui/doctest/test-no_std.rs b/tests/rustdoc-ui/doctest/test-no_std.rs index fd651d1a3442..897927f41569 100644 --- a/tests/rustdoc-ui/doctest/test-no_std.rs +++ b/tests/rustdoc-ui/doctest/test-no_std.rs @@ -1,7 +1,7 @@ -// compile-flags:--test -// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" -// check-pass +//@ compile-flags:--test +//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ check-pass #![no_std] diff --git a/tests/rustdoc-ui/doctest/test-type.rs b/tests/rustdoc-ui/doctest/test-type.rs index 036d37f9db2b..d18143368e86 100644 --- a/tests/rustdoc-ui/doctest/test-type.rs +++ b/tests/rustdoc-ui/doctest/test-type.rs @@ -1,7 +1,7 @@ -// compile-flags: --test --test-args=--test-threads=1 -// check-pass -// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ compile-flags: --test --test-args=--test-threads=1 +//@ check-pass +//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" /// ``` /// let a = true; diff --git a/tests/rustdoc-ui/doctest/unparseable-doc-test.rs b/tests/rustdoc-ui/doctest/unparseable-doc-test.rs index fd8b2094d020..e96e3b9cd358 100644 --- a/tests/rustdoc-ui/doctest/unparseable-doc-test.rs +++ b/tests/rustdoc-ui/doctest/unparseable-doc-test.rs @@ -1,8 +1,8 @@ -// compile-flags: --test -// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" -// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" -// failure-status: 101 -// rustc-env: RUST_BACKTRACE=0 +//@ compile-flags: --test +//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" +//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ failure-status: 101 +//@ rustc-env: RUST_BACKTRACE=0 /// ```rust /// let x = 7; diff --git a/tests/rustdoc-ui/error-in-impl-trait/async.rs b/tests/rustdoc-ui/error-in-impl-trait/async.rs index cda53bff07a1..b7e740163cdc 100644 --- a/tests/rustdoc-ui/error-in-impl-trait/async.rs +++ b/tests/rustdoc-ui/error-in-impl-trait/async.rs @@ -1,5 +1,5 @@ -// edition:2018 -// check-pass +//@ edition:2018 +//@ check-pass /// Should compile fine pub async fn a() -> u32 { diff --git a/tests/rustdoc-ui/error-in-impl-trait/closure.rs b/tests/rustdoc-ui/error-in-impl-trait/closure.rs index 628c61a6a1a8..74aae098e575 100644 --- a/tests/rustdoc-ui/error-in-impl-trait/closure.rs +++ b/tests/rustdoc-ui/error-in-impl-trait/closure.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // manually desugared version of an `async fn` (but with a closure instead of a coroutine) pub fn a() -> impl Fn() -> u32 { || content::doesnt::matter() diff --git a/tests/rustdoc-ui/error-in-impl-trait/const-generics.rs b/tests/rustdoc-ui/error-in-impl-trait/const-generics.rs index ed62f0208aa5..948014bb8580 100644 --- a/tests/rustdoc-ui/error-in-impl-trait/const-generics.rs +++ b/tests/rustdoc-ui/error-in-impl-trait/const-generics.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 trait ValidTrait {} /// This has docs diff --git a/tests/rustdoc-ui/error-in-impl-trait/generic-argument.rs b/tests/rustdoc-ui/error-in-impl-trait/generic-argument.rs index dcec379d47e9..735d0f5db389 100644 --- a/tests/rustdoc-ui/error-in-impl-trait/generic-argument.rs +++ b/tests/rustdoc-ui/error-in-impl-trait/generic-argument.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait ValidTrait {} /// This has docs diff --git a/tests/rustdoc-ui/error-in-impl-trait/impl-keyword-closure.rs b/tests/rustdoc-ui/error-in-impl-trait/impl-keyword-closure.rs index b935b0832f06..fef2520ddbe2 100644 --- a/tests/rustdoc-ui/error-in-impl-trait/impl-keyword-closure.rs +++ b/tests/rustdoc-ui/error-in-impl-trait/impl-keyword-closure.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait ValidTrait {} /// This returns impl trait pub fn g() -> impl ValidTrait { diff --git a/tests/rustdoc-ui/error-in-impl-trait/impl-keyword.rs b/tests/rustdoc-ui/error-in-impl-trait/impl-keyword.rs index 701126f87a1f..0cb5c33ef0de 100644 --- a/tests/rustdoc-ui/error-in-impl-trait/impl-keyword.rs +++ b/tests/rustdoc-ui/error-in-impl-trait/impl-keyword.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait ValidTrait {} /// This returns impl trait pub fn g() -> impl ValidTrait { diff --git a/tests/rustdoc-ui/error-in-impl-trait/infinite-recursive-type-impl-trait-return.rs b/tests/rustdoc-ui/error-in-impl-trait/infinite-recursive-type-impl-trait-return.rs index 939da186fbcd..dfa528acb263 100644 --- a/tests/rustdoc-ui/error-in-impl-trait/infinite-recursive-type-impl-trait-return.rs +++ b/tests/rustdoc-ui/error-in-impl-trait/infinite-recursive-type-impl-trait-return.rs @@ -1,6 +1,6 @@ -// normalize-stderr-test: "`.*`" -> "`DEF_ID`" -// normalize-stdout-test: "`.*`" -> "`DEF_ID`" -// edition:2018 +//@ normalize-stderr-test: "`.*`" -> "`DEF_ID`" +//@ normalize-stdout-test: "`.*`" -> "`DEF_ID`" +//@ edition:2018 pub async fn f() -> impl std::fmt::Debug { #[derive(Debug)] diff --git a/tests/rustdoc-ui/error-in-impl-trait/realistic-async.rs b/tests/rustdoc-ui/error-in-impl-trait/realistic-async.rs index 248575d35284..6c53c2912e1e 100644 --- a/tests/rustdoc-ui/error-in-impl-trait/realistic-async.rs +++ b/tests/rustdoc-ui/error-in-impl-trait/realistic-async.rs @@ -1,5 +1,5 @@ -// edition:2018 -// check-pass +//@ edition:2018 +//@ check-pass mod windows { pub trait WinFoo { diff --git a/tests/rustdoc-ui/error-in-impl-trait/trait-alias-closure.rs b/tests/rustdoc-ui/error-in-impl-trait/trait-alias-closure.rs index 31dd786cbbf8..b3fd59a72756 100644 --- a/tests/rustdoc-ui/error-in-impl-trait/trait-alias-closure.rs +++ b/tests/rustdoc-ui/error-in-impl-trait/trait-alias-closure.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] pub trait ValidTrait {} diff --git a/tests/rustdoc-ui/error-in-impl-trait/trait-alias.rs b/tests/rustdoc-ui/error-in-impl-trait/trait-alias.rs index c18a024af4bb..9e715e0d324e 100644 --- a/tests/rustdoc-ui/error-in-impl-trait/trait-alias.rs +++ b/tests/rustdoc-ui/error-in-impl-trait/trait-alias.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] pub trait ValidTrait {} diff --git a/tests/rustdoc-ui/feature-gate-custom_code_classes_in_docs.rs b/tests/rustdoc-ui/feature-gate-custom_code_classes_in_docs.rs index 1e7cdfc9ba7a..e96444039f4c 100644 --- a/tests/rustdoc-ui/feature-gate-custom_code_classes_in_docs.rs +++ b/tests/rustdoc-ui/feature-gate-custom_code_classes_in_docs.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass /// ```{class=language-c} /// int main(void) { return 0; } diff --git a/tests/rustdoc-ui/generate-link-to-definition/generate-link-to-definition-opt-unstable.rs b/tests/rustdoc-ui/generate-link-to-definition/generate-link-to-definition-opt-unstable.rs index 87620d74ee64..0ea2edb6f5a6 100644 --- a/tests/rustdoc-ui/generate-link-to-definition/generate-link-to-definition-opt-unstable.rs +++ b/tests/rustdoc-ui/generate-link-to-definition/generate-link-to-definition-opt-unstable.rs @@ -1,6 +1,6 @@ // This test purpose is to check that the "--generate-link-to-definition" // option can only be used on nightly. -// compile-flags: --generate-link-to-definition +//@ compile-flags: --generate-link-to-definition pub fn f() {} diff --git a/tests/rustdoc-ui/generate-link-to-definition/generate-link-to-definition-opt.rs b/tests/rustdoc-ui/generate-link-to-definition/generate-link-to-definition-opt.rs index 8f4f561b44dc..f11b94bb036c 100644 --- a/tests/rustdoc-ui/generate-link-to-definition/generate-link-to-definition-opt.rs +++ b/tests/rustdoc-ui/generate-link-to-definition/generate-link-to-definition-opt.rs @@ -1,6 +1,6 @@ // This test purpose is to check that the "--generate-link-to-definition" // option can only be used with HTML generation. -// compile-flags: -Zunstable-options --generate-link-to-definition --output-format json +//@ compile-flags: -Zunstable-options --generate-link-to-definition --output-format json pub fn f() {} diff --git a/tests/rustdoc-ui/generate-link-to-definition/generate-link-to-definition-opt2.rs b/tests/rustdoc-ui/generate-link-to-definition/generate-link-to-definition-opt2.rs index da5142087dde..718522059799 100644 --- a/tests/rustdoc-ui/generate-link-to-definition/generate-link-to-definition-opt2.rs +++ b/tests/rustdoc-ui/generate-link-to-definition/generate-link-to-definition-opt2.rs @@ -1,6 +1,6 @@ // This test purpose is to check that the "--generate-link-to-definition" // option can only be used with HTML generation. -// compile-flags: -Zunstable-options --generate-link-to-definition --show-coverage +//@ compile-flags: -Zunstable-options --generate-link-to-definition --show-coverage pub fn f() {} diff --git a/tests/rustdoc-ui/hidden-trait-method-34423.rs b/tests/rustdoc-ui/hidden-trait-method-34423.rs index f3107d2379c9..8f3572e35bcd 100644 --- a/tests/rustdoc-ui/hidden-trait-method-34423.rs +++ b/tests/rustdoc-ui/hidden-trait-method-34423.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // https://github.com/rust-lang/rust/issues/34423 pub struct Foo; diff --git a/tests/rustdoc-ui/ice-assoc-const-for-primitive-31808.rs b/tests/rustdoc-ui/ice-assoc-const-for-primitive-31808.rs index 6e4709403a4d..2c1c666b22c2 100644 --- a/tests/rustdoc-ui/ice-assoc-const-for-primitive-31808.rs +++ b/tests/rustdoc-ui/ice-assoc-const-for-primitive-31808.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Test that associated item impls on primitive types don't crash rustdoc diff --git a/tests/rustdoc-ui/ice-blanket-impl-52873.rs b/tests/rustdoc-ui/ice-blanket-impl-52873.rs index 2520957bd005..b150d41ce2ad 100644 --- a/tests/rustdoc-ui/ice-blanket-impl-52873.rs +++ b/tests/rustdoc-ui/ice-blanket-impl-52873.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // https://github.com/rust-lang/rust/issues/52873 #![crate_name="foo"] diff --git a/tests/rustdoc-ui/ice-blanket-impl-selection-55001.rs b/tests/rustdoc-ui/ice-blanket-impl-selection-55001.rs index babcb3dda143..89d3904af4e1 100644 --- a/tests/rustdoc-ui/ice-blanket-impl-selection-55001.rs +++ b/tests/rustdoc-ui/ice-blanket-impl-selection-55001.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // https://github.com/rust-lang/rust/issues/55001 #![crate_name="foo"] diff --git a/tests/rustdoc-ui/ice-bug-report-url.rs b/tests/rustdoc-ui/ice-bug-report-url.rs index a3fa819ab5e1..7c289b7c0cb6 100644 --- a/tests/rustdoc-ui/ice-bug-report-url.rs +++ b/tests/rustdoc-ui/ice-bug-report-url.rs @@ -1,15 +1,15 @@ -// compile-flags: -Ztreat-err-as-bug -// rustc-env:RUSTC_ICE=0 -// failure-status: 101 -// error-pattern: aborting due to -// error-pattern: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-rustdoc&template=ice.md +//@ compile-flags: -Ztreat-err-as-bug +//@ rustc-env:RUSTC_ICE=0 +//@ failure-status: 101 +//@ error-pattern: aborting due to +//@ error-pattern: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-rustdoc&template=ice.md -// normalize-stderr-test "note: compiler flags.*\n\n" -> "" -// normalize-stderr-test "note: rustc.*running on.*" -> "note: rustc {version} running on {platform}" -// normalize-stderr-test "thread.*panicked at compiler.*" -> "" -// normalize-stderr-test " +\d{1,}: .*\n" -> "" -// normalize-stderr-test " + at .*\n" -> "" -// normalize-stderr-test ".*note: Some details are omitted.*\n" -> "" +//@ normalize-stderr-test "note: compiler flags.*\n\n" -> "" +//@ normalize-stderr-test "note: rustc.*running on.*" -> "note: rustc {version} running on {platform}" +//@ normalize-stderr-test "thread.*panicked at compiler.*" -> "" +//@ normalize-stderr-test " +\d{1,}: .*\n" -> "" +//@ normalize-stderr-test " + at .*\n" -> "" +//@ normalize-stderr-test ".*note: Some details are omitted.*\n" -> "" fn wrong() //~^ ERROR expected one of diff --git a/tests/rustdoc-ui/ignore-block-help.rs b/tests/rustdoc-ui/ignore-block-help.rs index 86f6a2868fb5..bc46cdb0e00c 100644 --- a/tests/rustdoc-ui/ignore-block-help.rs +++ b/tests/rustdoc-ui/ignore-block-help.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass /// ```ignore (to-prevent-tidy-error) /// let heart = '❤️'; diff --git a/tests/rustdoc-ui/inherent-assoc-consts-36031.rs b/tests/rustdoc-ui/inherent-assoc-consts-36031.rs index 755fc1cfdff2..e487d130671f 100644 --- a/tests/rustdoc-ui/inherent-assoc-consts-36031.rs +++ b/tests/rustdoc-ui/inherent-assoc-consts-36031.rs @@ -1,7 +1,7 @@ -// aux-build:issue-36031.rs -// check-pass -// build-aux-docs -// ignore-cross-compile +//@ aux-build:issue-36031.rs +//@ check-pass +//@ build-aux-docs +//@ ignore-cross-compile // https://github.com/rust-lang/rust/issues/36031 diff --git a/tests/rustdoc-ui/intra-doc/assoc-field.rs b/tests/rustdoc-ui/intra-doc/assoc-field.rs index e18404e44306..00373fe21de6 100644 --- a/tests/rustdoc-ui/intra-doc/assoc-field.rs +++ b/tests/rustdoc-ui/intra-doc/assoc-field.rs @@ -1,7 +1,7 @@ // Traits in scope are collected for doc links in field attributes. -// check-pass -// aux-build: assoc-field-dep.rs +//@ check-pass +//@ aux-build: assoc-field-dep.rs extern crate assoc_field_dep; pub use assoc_field_dep::*; diff --git a/tests/rustdoc-ui/intra-doc/assoc-mod-inner-outer.rs b/tests/rustdoc-ui/intra-doc/assoc-mod-inner-outer.rs index b4ce3443ccd1..cb656edb5b30 100644 --- a/tests/rustdoc-ui/intra-doc/assoc-mod-inner-outer.rs +++ b/tests/rustdoc-ui/intra-doc/assoc-mod-inner-outer.rs @@ -1,7 +1,7 @@ // Traits in scope are collected for doc links in both outer and inner module attributes. -// check-pass -// aux-build: assoc-mod-inner-outer-dep.rs +//@ check-pass +//@ aux-build: assoc-mod-inner-outer-dep.rs extern crate assoc_mod_inner_outer_dep; pub use assoc_mod_inner_outer_dep::*; diff --git a/tests/rustdoc-ui/intra-doc/auxiliary/through-proc-macro-aux.rs b/tests/rustdoc-ui/intra-doc/auxiliary/through-proc-macro-aux.rs index 5c4a01ee3a74..80f0797e83fe 100644 --- a/tests/rustdoc-ui/intra-doc/auxiliary/through-proc-macro-aux.rs +++ b/tests/rustdoc-ui/intra-doc/auxiliary/through-proc-macro-aux.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] #![crate_name="some_macros"] diff --git a/tests/rustdoc-ui/intra-doc/broken-link-in-unused-doc-string.rs b/tests/rustdoc-ui/intra-doc/broken-link-in-unused-doc-string.rs index f3f044f61058..b88a52fb80f8 100644 --- a/tests/rustdoc-ui/intra-doc/broken-link-in-unused-doc-string.rs +++ b/tests/rustdoc-ui/intra-doc/broken-link-in-unused-doc-string.rs @@ -1,7 +1,7 @@ // Test that we don't ICE with broken links that don't show up in the docs. -// check-pass -// edition: 2021 +//@ check-pass +//@ edition: 2021 /// [1] //~^ WARN unresolved link to `1` diff --git a/tests/rustdoc-ui/intra-doc/broken-reexport.rs b/tests/rustdoc-ui/intra-doc/broken-reexport.rs index 862faa50b4dd..233396fbddaf 100644 --- a/tests/rustdoc-ui/intra-doc/broken-reexport.rs +++ b/tests/rustdoc-ui/intra-doc/broken-reexport.rs @@ -1,5 +1,5 @@ -// aux-build:intra-doc-broken.rs -// check-pass +//@ aux-build:intra-doc-broken.rs +//@ check-pass #![deny(rustdoc::broken_intra_doc_links)] diff --git a/tests/rustdoc-ui/intra-doc/double-anchor.rs b/tests/rustdoc-ui/intra-doc/double-anchor.rs index a01211c4f32b..ceb74c25af23 100644 --- a/tests/rustdoc-ui/intra-doc/double-anchor.rs +++ b/tests/rustdoc-ui/intra-doc/double-anchor.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // regression test for #73264 // should only give one error diff --git a/tests/rustdoc-ui/intra-doc/email-address-localhost.rs b/tests/rustdoc-ui/intra-doc/email-address-localhost.rs index 7a5156e81c4c..adef39527eb0 100644 --- a/tests/rustdoc-ui/intra-doc/email-address-localhost.rs +++ b/tests/rustdoc-ui/intra-doc/email-address-localhost.rs @@ -1,5 +1,5 @@ -// normalize-stderr-test: "nightly|beta|1\.[0-9][0-9]\.[0-9]" -> "$$CHANNEL" -// check-pass +//@ normalize-stderr-test: "nightly|beta|1\.[0-9][0-9]\.[0-9]" -> "$$CHANNEL" +//@ check-pass #![deny(warnings)] //! Email me at . diff --git a/tests/rustdoc-ui/intra-doc/extern-crate-load.rs b/tests/rustdoc-ui/intra-doc/extern-crate-load.rs index 438c56aa516a..df32f556e73c 100644 --- a/tests/rustdoc-ui/intra-doc/extern-crate-load.rs +++ b/tests/rustdoc-ui/intra-doc/extern-crate-load.rs @@ -1,8 +1,8 @@ -// check-pass -// aux-crate:dep1=dep1.rs -// aux-crate:dep2=dep2.rs -// aux-crate:dep3=dep3.rs -// aux-crate:dep4=dep4.rs +//@ check-pass +//@ aux-crate:dep1=dep1.rs +//@ aux-crate:dep2=dep2.rs +//@ aux-crate:dep3=dep3.rs +//@ aux-crate:dep4=dep4.rs #![deny(rustdoc::broken_intra_doc_links)] pub trait Trait { diff --git a/tests/rustdoc-ui/intra-doc/global-path.rs b/tests/rustdoc-ui/intra-doc/global-path.rs index cc7a5fa1c737..4064475355f3 100644 --- a/tests/rustdoc-ui/intra-doc/global-path.rs +++ b/tests/rustdoc-ui/intra-doc/global-path.rs @@ -1,7 +1,7 @@ // Doc link path with empty prefix that resolves to "extern prelude" instead of a module. -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 /// [::Unresolved] //~^ WARN unresolved link to `::Unresolved` diff --git a/tests/rustdoc-ui/intra-doc/import-inline-merge-module.rs b/tests/rustdoc-ui/intra-doc/import-inline-merge-module.rs index 4d6a32566457..636c3c8de42c 100644 --- a/tests/rustdoc-ui/intra-doc/import-inline-merge-module.rs +++ b/tests/rustdoc-ui/intra-doc/import-inline-merge-module.rs @@ -1,9 +1,9 @@ // Test for issue #108501. // Module parent scope doesn't hijack import's parent scope for the import's doc links. -// check-pass -// aux-build: inner-crate-doc.rs -// compile-flags: --extern inner_crate_doc --edition 2018 +//@ check-pass +//@ aux-build: inner-crate-doc.rs +//@ compile-flags: --extern inner_crate_doc --edition 2018 /// Import doc comment [inner_crate_doc] #[doc(inline)] diff --git a/tests/rustdoc-ui/intra-doc/import-inline-merge.rs b/tests/rustdoc-ui/intra-doc/import-inline-merge.rs index 31fef032b0fc..9307ec23b1e6 100644 --- a/tests/rustdoc-ui/intra-doc/import-inline-merge.rs +++ b/tests/rustdoc-ui/intra-doc/import-inline-merge.rs @@ -1,7 +1,7 @@ // Import for `A` is inlined and doc comments on the import and `A` itself are merged. // After the merge they still have correct parent scopes to resolve both `[A]` and `[B]`. -// check-pass +//@ check-pass #![allow(rustdoc::private_intra_doc_links)] diff --git a/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-10.rs b/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-10.rs index 464c5f0d5439..23dd8a140bf6 100644 --- a/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-10.rs +++ b/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-10.rs @@ -15,7 +15,7 @@ // 1 | //! [`derive@PartialEq`] // | +++++++ -// check-pass +//@ check-pass #![deny(rustdoc::broken_intra_doc_links)] diff --git a/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-9.rs b/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-9.rs index 3357ccf2460d..e4c8bcec2d3b 100644 --- a/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-9.rs +++ b/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-9.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(warnings)] diff --git a/tests/rustdoc-ui/intra-doc/macro-rules-error.rs b/tests/rustdoc-ui/intra-doc/macro-rules-error.rs index 8490584c1b42..0c9457c69da4 100644 --- a/tests/rustdoc-ui/intra-doc/macro-rules-error.rs +++ b/tests/rustdoc-ui/intra-doc/macro-rules-error.rs @@ -1,6 +1,6 @@ // `macro_rules` scopes are respected during doc link resolution. -// compile-flags: --document-private-items +//@ compile-flags: --document-private-items #![deny(rustdoc::broken_intra_doc_links)] diff --git a/tests/rustdoc-ui/intra-doc/macro-rules.rs b/tests/rustdoc-ui/intra-doc/macro-rules.rs index 3aeb370ef6dc..a82a936fe039 100644 --- a/tests/rustdoc-ui/intra-doc/macro-rules.rs +++ b/tests/rustdoc-ui/intra-doc/macro-rules.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(rustdoc::private_intra_doc_links)] macro_rules! foo { diff --git a/tests/rustdoc-ui/intra-doc/pointer-reexports-allowed.rs b/tests/rustdoc-ui/intra-doc/pointer-reexports-allowed.rs index 8654a8e1bd2b..567524438cab 100644 --- a/tests/rustdoc-ui/intra-doc/pointer-reexports-allowed.rs +++ b/tests/rustdoc-ui/intra-doc/pointer-reexports-allowed.rs @@ -1,4 +1,4 @@ -// aux-build:pointer-reexports-allowed.rs -// check-pass +//@ aux-build:pointer-reexports-allowed.rs +//@ check-pass extern crate inner; pub use inner::foo; diff --git a/tests/rustdoc-ui/intra-doc/private-from-crate-level.rs b/tests/rustdoc-ui/intra-doc/private-from-crate-level.rs index e429e75b2148..0ec11d861752 100644 --- a/tests/rustdoc-ui/intra-doc/private-from-crate-level.rs +++ b/tests/rustdoc-ui/intra-doc/private-from-crate-level.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass //! [my_module] //~^ WARN public documentation for `private_from_crate_level` links to private item `my_module` diff --git a/tests/rustdoc-ui/intra-doc/private.rs b/tests/rustdoc-ui/intra-doc/private.rs index 525332ddaac3..b1ab0a462aa5 100644 --- a/tests/rustdoc-ui/intra-doc/private.rs +++ b/tests/rustdoc-ui/intra-doc/private.rs @@ -1,6 +1,6 @@ -// check-pass -// revisions: public private -// [private]compile-flags: --document-private-items +//@ check-pass +//@ revisions: public private +//@ [private]compile-flags: --document-private-items // make sure to update `rustdoc/intra-doc/private.rs` if you update this file diff --git a/tests/rustdoc-ui/intra-doc/proc-macro-doc.rs b/tests/rustdoc-ui/intra-doc/proc-macro-doc.rs index 8335fc902cc5..5d6819273b70 100644 --- a/tests/rustdoc-ui/intra-doc/proc-macro-doc.rs +++ b/tests/rustdoc-ui/intra-doc/proc-macro-doc.rs @@ -1,7 +1,7 @@ -// check-pass -// force-host -// no-prefer-dynamic -// compile-flags: --crate-type proc-macro +//@ check-pass +//@ force-host +//@ no-prefer-dynamic +//@ compile-flags: --crate-type proc-macro #![deny(rustdoc::broken_intra_doc_links)] diff --git a/tests/rustdoc-ui/intra-doc/reachable-non-exported.rs b/tests/rustdoc-ui/intra-doc/reachable-non-exported.rs index 6afcad4f9211..5eabf3a09ad1 100644 --- a/tests/rustdoc-ui/intra-doc/reachable-non-exported.rs +++ b/tests/rustdoc-ui/intra-doc/reachable-non-exported.rs @@ -1,7 +1,7 @@ // The structure is reachable, but not exported, so rustdoc // doesn't attempt to request doc link resolutions on it. -// check-pass +//@ check-pass mod private { /// [core::str::FromStr] diff --git a/tests/rustdoc-ui/intra-doc/through-proc-macro.rs b/tests/rustdoc-ui/intra-doc/through-proc-macro.rs index 7628c3928fec..beec9e2833c7 100644 --- a/tests/rustdoc-ui/intra-doc/through-proc-macro.rs +++ b/tests/rustdoc-ui/intra-doc/through-proc-macro.rs @@ -1,6 +1,6 @@ -// check-pass -// aux-build:through-proc-macro-aux.rs -// build-aux-docs +//@ check-pass +//@ aux-build:through-proc-macro-aux.rs +//@ build-aux-docs // Ensure rustdoc doesn't panic on this code. diff --git a/tests/rustdoc-ui/intra-doc/unknown-disambiguator.rs b/tests/rustdoc-ui/intra-doc/unknown-disambiguator.rs index 0aa1e5a415aa..68b818e32b35 100644 --- a/tests/rustdoc-ui/intra-doc/unknown-disambiguator.rs +++ b/tests/rustdoc-ui/intra-doc/unknown-disambiguator.rs @@ -1,4 +1,4 @@ -// normalize-stderr-test: "nightly|beta|1\.[0-9][0-9]\.[0-9]" -> "$$CHANNEL" +//@ normalize-stderr-test: "nightly|beta|1\.[0-9][0-9]\.[0-9]" -> "$$CHANNEL" #![deny(warnings)] //! Linking to [foo@banana] and [`bar@banana!()`]. diff --git a/tests/rustdoc-ui/intra-doc/unused-extern-crate.rs b/tests/rustdoc-ui/intra-doc/unused-extern-crate.rs index 9565830930f4..f1f30c2a93d7 100644 --- a/tests/rustdoc-ui/intra-doc/unused-extern-crate.rs +++ b/tests/rustdoc-ui/intra-doc/unused-extern-crate.rs @@ -1,4 +1,4 @@ -// compile-flags: --extern zip=whatever.rlib +//@ compile-flags: --extern zip=whatever.rlib #![deny(rustdoc::broken_intra_doc_links)] /// See [zip] crate. //~^ ERROR unresolved diff --git a/tests/rustdoc-ui/intra-doc/warning-crlf.rs b/tests/rustdoc-ui/intra-doc/warning-crlf.rs index a19c33b53be0..ab096b860f81 100644 --- a/tests/rustdoc-ui/intra-doc/warning-crlf.rs +++ b/tests/rustdoc-ui/intra-doc/warning-crlf.rs @@ -1,5 +1,5 @@ // ignore-tidy-cr -// check-pass +//@ check-pass // This file checks the spans of intra-link warnings in a file with CRLF line endings. The // .gitattributes file in this directory should enforce it. diff --git a/tests/rustdoc-ui/intra-doc/warning.rs b/tests/rustdoc-ui/intra-doc/warning.rs index eab1f0348046..96b5c2b36a18 100644 --- a/tests/rustdoc-ui/intra-doc/warning.rs +++ b/tests/rustdoc-ui/intra-doc/warning.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass //! Test with [Foo::baz], [Bar::foo], ... //~^ WARNING `Foo::baz` diff --git a/tests/rustdoc-ui/invalid-syntax.rs b/tests/rustdoc-ui/invalid-syntax.rs index acb2a6f084f2..42469da83761 100644 --- a/tests/rustdoc-ui/invalid-syntax.rs +++ b/tests/rustdoc-ui/invalid-syntax.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass /// ``` /// \__________pkt->size___________/ \_result->size_/ \__pkt->size__/ diff --git a/tests/rustdoc-ui/invalid-theme-name.rs b/tests/rustdoc-ui/invalid-theme-name.rs index c22ebf02718e..d632a08ebc80 100644 --- a/tests/rustdoc-ui/invalid-theme-name.rs +++ b/tests/rustdoc-ui/invalid-theme-name.rs @@ -1,3 +1,3 @@ -// compile-flags:--theme {{src-base}}/invalid-theme-name.rs -// error-pattern: invalid argument -// error-pattern: must have a .css extension +//@ compile-flags:--theme {{src-base}}/invalid-theme-name.rs +//@ error-pattern: invalid argument +//@ error-pattern: must have a .css extension diff --git a/tests/rustdoc-ui/issue-110629-private-type-cycle.rs b/tests/rustdoc-ui/issue-110629-private-type-cycle.rs index 2d46ddbfa6e5..b31b9d03e7cb 100644 --- a/tests/rustdoc-ui/issue-110629-private-type-cycle.rs +++ b/tests/rustdoc-ui/issue-110629-private-type-cycle.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(type_alias_impl_trait)] diff --git a/tests/rustdoc-ui/issues/auxiliary/empty-fn.rs b/tests/rustdoc-ui/issues/auxiliary/empty-fn.rs index 877810f15d7f..b270c93fd639 100644 --- a/tests/rustdoc-ui/issues/auxiliary/empty-fn.rs +++ b/tests/rustdoc-ui/issues/auxiliary/empty-fn.rs @@ -1,3 +1,3 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic #![crate_type = "lib"] pub fn empty() {} diff --git a/tests/rustdoc-ui/issues/auxiliary/panic-handler.rs b/tests/rustdoc-ui/issues/auxiliary/panic-handler.rs index 0aaaeee10514..d157c6a434e5 100644 --- a/tests/rustdoc-ui/issues/auxiliary/panic-handler.rs +++ b/tests/rustdoc-ui/issues/auxiliary/panic-handler.rs @@ -1,4 +1,4 @@ -// compile-flags: -C panic=abort +//@ compile-flags: -C panic=abort #![no_std] #![no_main] diff --git a/tests/rustdoc-ui/issues/issue-101076.rs b/tests/rustdoc-ui/issues/issue-101076.rs index 648f9902908a..f9b93c408fd6 100644 --- a/tests/rustdoc-ui/issues/issue-101076.rs +++ b/tests/rustdoc-ui/issues/issue-101076.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass const _: () = { #[macro_export] diff --git a/tests/rustdoc-ui/issues/issue-103997.rs b/tests/rustdoc-ui/issues/issue-103997.rs index 36f42fb15f7e..ebd1d2e4447d 100644 --- a/tests/rustdoc-ui/issues/issue-103997.rs +++ b/tests/rustdoc-ui/issues/issue-103997.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub fn foo() {} diff --git a/tests/rustdoc-ui/issues/issue-105742.rs b/tests/rustdoc-ui/issues/issue-105742.rs index 5e493515cad5..bd8ec4e8b589 100644 --- a/tests/rustdoc-ui/issues/issue-105742.rs +++ b/tests/rustdoc-ui/issues/issue-105742.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znormalize-docs +//@ compile-flags: -Znormalize-docs use std::ops::Index; pub fn next<'a, T>(s: &'a mut dyn SVec) { diff --git a/tests/rustdoc-ui/issues/issue-106213.rs b/tests/rustdoc-ui/issues/issue-106213.rs index 6d51846b7d0c..5c3a83902523 100644 --- a/tests/rustdoc-ui/issues/issue-106213.rs +++ b/tests/rustdoc-ui/issues/issue-106213.rs @@ -1,5 +1,5 @@ -// compile-flags: --document-private-items -// edition:2021 +//@ compile-flags: --document-private-items +//@ edition:2021 fn use_avx() -> dyn { //~^ ERROR at least one trait is required for an object type diff --git a/tests/rustdoc-ui/issues/issue-107918.rs b/tests/rustdoc-ui/issues/issue-107918.rs index 0ddb3dc92150..19d53f84cb66 100644 --- a/tests/rustdoc-ui/issues/issue-107918.rs +++ b/tests/rustdoc-ui/issues/issue-107918.rs @@ -1,7 +1,7 @@ -// aux-build:panic-handler.rs -// compile-flags: --document-private-items -// build-pass -// only-linux +//@ aux-build:panic-handler.rs +//@ compile-flags: --document-private-items +//@ build-pass +//@ only-linux #![no_std] #![no_main] diff --git a/tests/rustdoc-ui/issues/issue-109282-import-inline-merge.rs b/tests/rustdoc-ui/issues/issue-109282-import-inline-merge.rs index 0ec8523222fb..e4486ab26f90 100644 --- a/tests/rustdoc-ui/issues/issue-109282-import-inline-merge.rs +++ b/tests/rustdoc-ui/issues/issue-109282-import-inline-merge.rs @@ -2,7 +2,7 @@ // Import for `ValueEnum` is inlined and doc comments on the import and `ValueEnum` itself are // merged. After the merge they still have correct parent scopes to resolve both `[ValueEnum]`. -// check-pass +//@ check-pass mod m { pub enum ValueEnum {} diff --git a/tests/rustdoc-ui/issues/issue-110900.rs b/tests/rustdoc-ui/issues/issue-110900.rs index e3154baf860a..5f90444dfd30 100644 --- a/tests/rustdoc-ui/issues/issue-110900.rs +++ b/tests/rustdoc-ui/issues/issue-110900.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![crate_type="lib"] #![feature(associated_type_bounds)] diff --git a/tests/rustdoc-ui/issues/issue-120444-1.rs b/tests/rustdoc-ui/issues/issue-120444-1.rs index 25d0111a7b76..51f2b98fb304 100644 --- a/tests/rustdoc-ui/issues/issue-120444-1.rs +++ b/tests/rustdoc-ui/issues/issue-120444-1.rs @@ -1,4 +1,4 @@ -// compile-flags: --document-private-items +//@ compile-flags: --document-private-items #![deny(rustdoc::redundant_explicit_links)] diff --git a/tests/rustdoc-ui/issues/issue-120444-2.rs b/tests/rustdoc-ui/issues/issue-120444-2.rs index d13bf8846243..f0e842fd8587 100644 --- a/tests/rustdoc-ui/issues/issue-120444-2.rs +++ b/tests/rustdoc-ui/issues/issue-120444-2.rs @@ -1,4 +1,4 @@ -// compile-flags: --document-private-items +//@ compile-flags: --document-private-items #![deny(rustdoc::redundant_explicit_links)] diff --git a/tests/rustdoc-ui/issues/issue-58473-2.rs b/tests/rustdoc-ui/issues/issue-58473-2.rs index 000b6a329c1a..1653da0d139a 100644 --- a/tests/rustdoc-ui/issues/issue-58473-2.rs +++ b/tests/rustdoc-ui/issues/issue-58473-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(rustdoc::private_doc_tests)] diff --git a/tests/rustdoc-ui/issues/issue-58473.rs b/tests/rustdoc-ui/issues/issue-58473.rs index 44e1f58d0a0f..2d3772ed7523 100644 --- a/tests/rustdoc-ui/issues/issue-58473.rs +++ b/tests/rustdoc-ui/issues/issue-58473.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass pub trait Foo { /** diff --git a/tests/rustdoc-ui/issues/issue-61592-2.rs b/tests/rustdoc-ui/issues/issue-61592-2.rs index 5b4fc5ee7006..3553f51ed969 100644 --- a/tests/rustdoc-ui/issues/issue-61592-2.rs +++ b/tests/rustdoc-ui/issues/issue-61592-2.rs @@ -1,4 +1,4 @@ -// aux-build:issue-61592.rs +//@ aux-build:issue-61592.rs extern crate foo; diff --git a/tests/rustdoc-ui/issues/issue-61592.rs b/tests/rustdoc-ui/issues/issue-61592.rs index 66772557f2c2..4721f7d35c53 100644 --- a/tests/rustdoc-ui/issues/issue-61592.rs +++ b/tests/rustdoc-ui/issues/issue-61592.rs @@ -1,4 +1,4 @@ -// aux-build:issue-61592.rs +//@ aux-build:issue-61592.rs extern crate foo; diff --git a/tests/rustdoc-ui/issues/issue-74134.rs b/tests/rustdoc-ui/issues/issue-74134.rs index b1be9123aaf8..919435c64b52 100644 --- a/tests/rustdoc-ui/issues/issue-74134.rs +++ b/tests/rustdoc-ui/issues/issue-74134.rs @@ -1,6 +1,6 @@ -// revisions: public private -// [private]compile-flags: --document-private-items -// check-pass +//@ revisions: public private +//@ [private]compile-flags: --document-private-items +//@ check-pass // There are 4 cases here: // 1. public item -> public type: no warning diff --git a/tests/rustdoc-ui/issues/issue-79494.rs b/tests/rustdoc-ui/issues/issue-79494.rs index fc39424b793f..7a1890c4429a 100644 --- a/tests/rustdoc-ui/issues/issue-79494.rs +++ b/tests/rustdoc-ui/issues/issue-79494.rs @@ -1,4 +1,4 @@ -// only-x86_64-unknown-linux-gnu +//@ only-x86_64-unknown-linux-gnu #![feature(const_transmute)] diff --git a/tests/rustdoc-ui/issues/issue-80992.rs b/tests/rustdoc-ui/issues/issue-80992.rs index f5ae16981ca1..4e112fc92513 100644 --- a/tests/rustdoc-ui/issues/issue-80992.rs +++ b/tests/rustdoc-ui/issues/issue-80992.rs @@ -1,7 +1,7 @@ -// check-pass -// compile-flags:--test -// normalize-stdout-test: "tests/rustdoc-ui/issues" -> "$$DIR" -// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ check-pass +//@ compile-flags:--test +//@ normalize-stdout-test: "tests/rustdoc-ui/issues" -> "$$DIR" +//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" pub fn test() -> Result<(), ()> { //! ```compile_fail diff --git a/tests/rustdoc-ui/issues/issue-81662-shortness.rs b/tests/rustdoc-ui/issues/issue-81662-shortness.rs index 79fb65dec48a..736ca3c5bad2 100644 --- a/tests/rustdoc-ui/issues/issue-81662-shortness.rs +++ b/tests/rustdoc-ui/issues/issue-81662-shortness.rs @@ -1,9 +1,9 @@ -// compile-flags:--test --error-format=short -// check-stdout -// error-pattern:cannot find function `foo` in this scope -// normalize-stdout-test: "tests/rustdoc-ui/issues" -> "$$DIR" -// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" -// failure-status: 101 +//@ compile-flags:--test --error-format=short +//@ check-stdout +//@ error-pattern:cannot find function `foo` in this scope +//@ normalize-stdout-test: "tests/rustdoc-ui/issues" -> "$$DIR" +//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ failure-status: 101 /// ```rust /// foo(); diff --git a/tests/rustdoc-ui/issues/issue-83883-describe-lints.rs b/tests/rustdoc-ui/issues/issue-83883-describe-lints.rs index 0474d6c143e9..a7b1c734d7f5 100644 --- a/tests/rustdoc-ui/issues/issue-83883-describe-lints.rs +++ b/tests/rustdoc-ui/issues/issue-83883-describe-lints.rs @@ -1,10 +1,10 @@ -// compile-flags: -W help -// check-pass -// check-stdout -// error-pattern:Lint checks provided -// error-pattern:rustdoc::broken-intra-doc-links +//@ compile-flags: -W help +//@ check-pass +//@ check-stdout +//@ error-pattern:Lint checks provided +//@ error-pattern:rustdoc::broken-intra-doc-links // // ignore-tidy-linelength // -// normalize-stdout-test: "( +name default meaning\n +---- ------- -------\n)?( *[[:word:]:-]+ (allow |warn |deny |forbid ) [^\n]+\n)+" -> " $$NAMES $$LEVELS $$MEANINGS" -// normalize-stdout-test: " +name sub-lints\n +---- ---------\n( *[[:word:]:-]+ [^\n]+\n)+" -> " $$NAMES $$SUB_LINTS" +//@ normalize-stdout-test: "( +name default meaning\n +---- ------- -------\n)?( *[[:word:]:-]+ (allow |warn |deny |forbid ) [^\n]+\n)+" -> " $$NAMES $$LEVELS $$MEANINGS" +//@ normalize-stdout-test: " +name sub-lints\n +---- ---------\n( *[[:word:]:-]+ [^\n]+\n)+" -> " $$NAMES $$SUB_LINTS" diff --git a/tests/rustdoc-ui/issues/issue-91134.rs b/tests/rustdoc-ui/issues/issue-91134.rs index 85362f186cc7..b80d6539ebe9 100644 --- a/tests/rustdoc-ui/issues/issue-91134.rs +++ b/tests/rustdoc-ui/issues/issue-91134.rs @@ -1,9 +1,9 @@ -// compile-flags: --test --crate-name=empty_fn --extern=empty_fn --test-args=--test-threads=1 -// aux-build:empty-fn.rs -// check-pass -// normalize-stdout-test: "tests/rustdoc-ui/issues" -> "$$DIR" -// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" -// edition:2021 +//@ compile-flags: --test --crate-name=empty_fn --extern=empty_fn --test-args=--test-threads=1 +//@ aux-build:empty-fn.rs +//@ check-pass +//@ normalize-stdout-test: "tests/rustdoc-ui/issues" -> "$$DIR" +//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" +//@ edition:2021 /// /// diff --git a/tests/rustdoc-ui/issues/issue-91713.rs b/tests/rustdoc-ui/issues/issue-91713.rs index 610bbf11d9cb..9875b5d4ad69 100644 --- a/tests/rustdoc-ui/issues/issue-91713.rs +++ b/tests/rustdoc-ui/issues/issue-91713.rs @@ -1,3 +1,3 @@ -// check-pass -// compile-flags: --passes list -// error-pattern: the `passes` flag no longer functions +//@ check-pass +//@ compile-flags: --passes list +//@ error-pattern: the `passes` flag no longer functions diff --git a/tests/rustdoc-ui/issues/issue-98690.rs b/tests/rustdoc-ui/issues/issue-98690.rs index fe9bd87ab28e..01708f3f64d3 100644 --- a/tests/rustdoc-ui/issues/issue-98690.rs +++ b/tests/rustdoc-ui/issues/issue-98690.rs @@ -1,6 +1,6 @@ -// compile-flags: --test --persist-doctests /../../ -Z unstable-options -// failure-status: 101 -// only-linux +//@ compile-flags: --test --persist-doctests /../../ -Z unstable-options +//@ failure-status: 101 +//@ only-linux #![crate_name = "foo"] diff --git a/tests/rustdoc-ui/lints/bare-urls.fixed b/tests/rustdoc-ui/lints/bare-urls.fixed index 23aa5c44c21f..7938d715199d 100644 --- a/tests/rustdoc-ui/lints/bare-urls.fixed +++ b/tests/rustdoc-ui/lints/bare-urls.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(rustdoc::bare_urls)] diff --git a/tests/rustdoc-ui/lints/bare-urls.rs b/tests/rustdoc-ui/lints/bare-urls.rs index 592f57343bc9..75f42b78ffbb 100644 --- a/tests/rustdoc-ui/lints/bare-urls.rs +++ b/tests/rustdoc-ui/lints/bare-urls.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(rustdoc::bare_urls)] diff --git a/tests/rustdoc-ui/lints/check-fail.rs b/tests/rustdoc-ui/lints/check-fail.rs index 02632b4ce7d3..903cbdb532ab 100644 --- a/tests/rustdoc-ui/lints/check-fail.rs +++ b/tests/rustdoc-ui/lints/check-fail.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z unstable-options --check +//@ compile-flags: -Z unstable-options --check #![feature(rustdoc_missing_doc_code_examples)] #![deny(missing_docs)] diff --git a/tests/rustdoc-ui/lints/check.rs b/tests/rustdoc-ui/lints/check.rs index e389a81bb33c..391ba517077c 100644 --- a/tests/rustdoc-ui/lints/check.rs +++ b/tests/rustdoc-ui/lints/check.rs @@ -1,6 +1,6 @@ -// check-pass -// compile-flags: -Z unstable-options --check -// normalize-stderr-test: "nightly|beta|1\.[0-9][0-9]\.[0-9]" -> "$$CHANNEL" +//@ check-pass +//@ compile-flags: -Z unstable-options --check +//@ normalize-stderr-test: "nightly|beta|1\.[0-9][0-9]\.[0-9]" -> "$$CHANNEL" #![feature(rustdoc_missing_doc_code_examples)] //~^ WARN diff --git a/tests/rustdoc-ui/lints/doc-spotlight.fixed b/tests/rustdoc-ui/lints/doc-spotlight.fixed index 4b58778eacd1..6de95a33589b 100644 --- a/tests/rustdoc-ui/lints/doc-spotlight.fixed +++ b/tests/rustdoc-ui/lints/doc-spotlight.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(warnings)] #![feature(doc_notable_trait)] diff --git a/tests/rustdoc-ui/lints/doc-spotlight.rs b/tests/rustdoc-ui/lints/doc-spotlight.rs index 16e387245802..9823ea905228 100644 --- a/tests/rustdoc-ui/lints/doc-spotlight.rs +++ b/tests/rustdoc-ui/lints/doc-spotlight.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(warnings)] #![feature(doc_notable_trait)] diff --git a/tests/rustdoc-ui/lints/expect-tool-lint-rfc-2383.rs b/tests/rustdoc-ui/lints/expect-tool-lint-rfc-2383.rs index ffd694e98790..169505b04066 100644 --- a/tests/rustdoc-ui/lints/expect-tool-lint-rfc-2383.rs +++ b/tests/rustdoc-ui/lints/expect-tool-lint-rfc-2383.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(lint_reasons)] //! This file tests the `#[expect]` attribute implementation for tool lints. The same diff --git a/tests/rustdoc-ui/lints/feature-gate-rustdoc_missing_doc_code_examples.rs b/tests/rustdoc-ui/lints/feature-gate-rustdoc_missing_doc_code_examples.rs index 832f129fab2d..46e337cf2b3f 100644 --- a/tests/rustdoc-ui/lints/feature-gate-rustdoc_missing_doc_code_examples.rs +++ b/tests/rustdoc-ui/lints/feature-gate-rustdoc_missing_doc_code_examples.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zdeduplicate-diagnostics=yes +//@ compile-flags: -Zdeduplicate-diagnostics=yes #![deny(unknown_lints)] //~^ NOTE defined here #![allow(rustdoc::missing_doc_code_examples)] diff --git a/tests/rustdoc-ui/lints/inline-doc-link.rs b/tests/rustdoc-ui/lints/inline-doc-link.rs index 596f89be3d6d..0792bc38af48 100644 --- a/tests/rustdoc-ui/lints/inline-doc-link.rs +++ b/tests/rustdoc-ui/lints/inline-doc-link.rs @@ -1,6 +1,6 @@ // Regression test for -// check-pass +//@ check-pass #![deny(rustdoc::redundant_explicit_links)] mod m { diff --git a/tests/rustdoc-ui/lints/no-crate-level-doc-lint.rs b/tests/rustdoc-ui/lints/no-crate-level-doc-lint.rs index a186410acf48..12d4892d36a8 100644 --- a/tests/rustdoc-ui/lints/no-crate-level-doc-lint.rs +++ b/tests/rustdoc-ui/lints/no-crate-level-doc-lint.rs @@ -1,5 +1,5 @@ -// error-pattern: no documentation found -// normalize-stderr-test: "nightly|beta|1\.[0-9][0-9]\.[0-9]" -> "$$CHANNEL" +//@ error-pattern: no documentation found +//@ normalize-stderr-test: "nightly|beta|1\.[0-9][0-9]\.[0-9]" -> "$$CHANNEL" #![deny(rustdoc::missing_crate_level_docs)] //^~ NOTE defined here diff --git a/tests/rustdoc-ui/lints/no-redundancy.rs b/tests/rustdoc-ui/lints/no-redundancy.rs index e3358728b1b1..6609ce6a4f8d 100644 --- a/tests/rustdoc-ui/lints/no-redundancy.rs +++ b/tests/rustdoc-ui/lints/no-redundancy.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(rustdoc::redundant_explicit_links)] diff --git a/tests/rustdoc-ui/lints/redundant_explicit_links-utf8.rs b/tests/rustdoc-ui/lints/redundant_explicit_links-utf8.rs index fecefb7b25ff..4f4590d45fc8 100644 --- a/tests/rustdoc-ui/lints/redundant_explicit_links-utf8.rs +++ b/tests/rustdoc-ui/lints/redundant_explicit_links-utf8.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass /// [`…foo`] [`…bar`] [`Err`] pub struct Broken {} diff --git a/tests/rustdoc-ui/lints/redundant_explicit_links.fixed b/tests/rustdoc-ui/lints/redundant_explicit_links.fixed index 900234e31e98..c40c5691e608 100644 --- a/tests/rustdoc-ui/lints/redundant_explicit_links.fixed +++ b/tests/rustdoc-ui/lints/redundant_explicit_links.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(rustdoc::redundant_explicit_links)] diff --git a/tests/rustdoc-ui/lints/redundant_explicit_links.rs b/tests/rustdoc-ui/lints/redundant_explicit_links.rs index 13feb85e0517..dc64a5613fb2 100644 --- a/tests/rustdoc-ui/lints/redundant_explicit_links.rs +++ b/tests/rustdoc-ui/lints/redundant_explicit_links.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(rustdoc::redundant_explicit_links)] diff --git a/tests/rustdoc-ui/lints/rustdoc-all-only-stable-lints.rs b/tests/rustdoc-ui/lints/rustdoc-all-only-stable-lints.rs index e106d06aff59..d628867cb9b5 100644 --- a/tests/rustdoc-ui/lints/rustdoc-all-only-stable-lints.rs +++ b/tests/rustdoc-ui/lints/rustdoc-all-only-stable-lints.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Ensure `rustdoc::all` only affects stable lints. See #106289. diff --git a/tests/rustdoc-ui/lints/unused-braces-lint.rs b/tests/rustdoc-ui/lints/unused-braces-lint.rs index be0e31e4be2f..fc5dcbf4d74a 100644 --- a/tests/rustdoc-ui/lints/unused-braces-lint.rs +++ b/tests/rustdoc-ui/lints/unused-braces-lint.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // This tests the bug in #70814, where the unused_braces lint triggered on the following code // without providing a span. diff --git a/tests/rustdoc-ui/lints/unused.rs b/tests/rustdoc-ui/lints/unused.rs index 702b24c36c56..f52f4c9c9e32 100644 --- a/tests/rustdoc-ui/lints/unused.rs +++ b/tests/rustdoc-ui/lints/unused.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // This test purpose is to check that unused_imports lint isn't fired // by rustdoc. Why would it? Because when rustdoc is running, it uses diff --git a/tests/rustdoc-ui/macro-docs.rs b/tests/rustdoc-ui/macro-docs.rs index 0e8472eb2427..f7040289e038 100644 --- a/tests/rustdoc-ui/macro-docs.rs +++ b/tests/rustdoc-ui/macro-docs.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass macro_rules! m { () => { diff --git a/tests/rustdoc-ui/nested-extern-crate-46271.rs b/tests/rustdoc-ui/nested-extern-crate-46271.rs index d2ac38f3e455..9efc8063f92c 100644 --- a/tests/rustdoc-ui/nested-extern-crate-46271.rs +++ b/tests/rustdoc-ui/nested-extern-crate-46271.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // hopefully this doesn't cause an ICE // https://github.com/rust-lang/rust/issues/46271 diff --git a/tests/rustdoc-ui/nested-macro-rules-47639.rs b/tests/rustdoc-ui/nested-macro-rules-47639.rs index 210b1e79cd2f..32c4e7b10b43 100644 --- a/tests/rustdoc-ui/nested-macro-rules-47639.rs +++ b/tests/rustdoc-ui/nested-macro-rules-47639.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // This should not ICE // https://github.com/rust-lang/rust/issues/47639 diff --git a/tests/rustdoc-ui/normalize-cycle.rs b/tests/rustdoc-ui/normalize-cycle.rs index 1ed9ac6bc34a..35c03df0ca91 100644 --- a/tests/rustdoc-ui/normalize-cycle.rs +++ b/tests/rustdoc-ui/normalize-cycle.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Znormalize-docs +//@ check-pass +//@ compile-flags: -Znormalize-docs // Regression test for . pub trait Query {} diff --git a/tests/rustdoc-ui/normalize-in-inlined-type-alias.rs b/tests/rustdoc-ui/normalize-in-inlined-type-alias.rs index 45e04a70c091..2f92f173c35b 100644 --- a/tests/rustdoc-ui/normalize-in-inlined-type-alias.rs +++ b/tests/rustdoc-ui/normalize-in-inlined-type-alias.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Znormalize-docs +//@ check-pass +//@ compile-flags: -Znormalize-docs trait Woo { type Assoc; diff --git a/tests/rustdoc-ui/normalize-overflow.rs b/tests/rustdoc-ui/normalize-overflow.rs index 3698fe70e7f7..30b0d2f26e81 100644 --- a/tests/rustdoc-ui/normalize-overflow.rs +++ b/tests/rustdoc-ui/normalize-overflow.rs @@ -1,5 +1,5 @@ -// aux-crate:overflow=overflow.rs -// check-pass +//@ aux-crate:overflow=overflow.rs +//@ check-pass // Regression test for . extern crate overflow; diff --git a/tests/rustdoc-ui/not-wf-ambiguous-normalization.rs b/tests/rustdoc-ui/not-wf-ambiguous-normalization.rs index 3e4825d83b1f..16e2c7d60b83 100644 --- a/tests/rustdoc-ui/not-wf-ambiguous-normalization.rs +++ b/tests/rustdoc-ui/not-wf-ambiguous-normalization.rs @@ -1,4 +1,4 @@ -// compile-flags: -Znormalize-docs +//@ compile-flags: -Znormalize-docs #![feature(type_alias_impl_trait)] diff --git a/tests/rustdoc-ui/output-format-html-stable.rs b/tests/rustdoc-ui/output-format-html-stable.rs index fa0362640bb8..f178c51a7142 100644 --- a/tests/rustdoc-ui/output-format-html-stable.rs +++ b/tests/rustdoc-ui/output-format-html-stable.rs @@ -1,4 +1,4 @@ -// compile-flags: --output-format html -// check-pass +//@ compile-flags: --output-format html +//@ check-pass // This tests that `--output-format html` is accepted without `-Z unstable-options`, // since it has been stable since 1.0. diff --git a/tests/rustdoc-ui/range-pattern.rs b/tests/rustdoc-ui/range-pattern.rs index fd255d02fcb6..5e47dc826fe5 100644 --- a/tests/rustdoc-ui/range-pattern.rs +++ b/tests/rustdoc-ui/range-pattern.rs @@ -1,3 +1,3 @@ -// check-pass +//@ check-pass fn func(0u8..=255: u8) {} diff --git a/tests/rustdoc-ui/recursive-deref-ice.rs b/tests/rustdoc-ui/recursive-deref-ice.rs index 9e62841f99be..5957434e85b9 100644 --- a/tests/rustdoc-ui/recursive-deref-ice.rs +++ b/tests/rustdoc-ui/recursive-deref-ice.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // ICE found in https://github.com/rust-lang/rust/issues/83123 diff --git a/tests/rustdoc-ui/scrape-examples/scrape-examples-fail-if-type-error.rs b/tests/rustdoc-ui/scrape-examples/scrape-examples-fail-if-type-error.rs index 8f4fde96d7e4..4fb5c9ab36fa 100644 --- a/tests/rustdoc-ui/scrape-examples/scrape-examples-fail-if-type-error.rs +++ b/tests/rustdoc-ui/scrape-examples/scrape-examples-fail-if-type-error.rs @@ -1,5 +1,5 @@ -// check-fail -// compile-flags: -Z unstable-options --scrape-examples-output-path {{build-base}}/t.calls --scrape-examples-target-crate foobar +//@ check-fail +//@ compile-flags: -Z unstable-options --scrape-examples-output-path {{build-base}}/t.calls --scrape-examples-target-crate foobar pub fn foo() { INVALID_FUNC(); diff --git a/tests/rustdoc-ui/scrape-examples/scrape-examples-ice.rs b/tests/rustdoc-ui/scrape-examples/scrape-examples-ice.rs index d629b62a7241..0c7aeb800dcc 100644 --- a/tests/rustdoc-ui/scrape-examples/scrape-examples-ice.rs +++ b/tests/rustdoc-ui/scrape-examples/scrape-examples-ice.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z unstable-options --scrape-examples-output-path {{build-base}}/t.calls --scrape-examples-target-crate foobar -// check-pass +//@ compile-flags: -Z unstable-options --scrape-examples-output-path {{build-base}}/t.calls --scrape-examples-target-crate foobar +//@ check-pass #![no_std] use core as _; diff --git a/tests/rustdoc-ui/scrape-examples/scrape-examples-wrong-options-1.rs b/tests/rustdoc-ui/scrape-examples/scrape-examples-wrong-options-1.rs index a1f005c32ee0..df7b41e20f6f 100644 --- a/tests/rustdoc-ui/scrape-examples/scrape-examples-wrong-options-1.rs +++ b/tests/rustdoc-ui/scrape-examples/scrape-examples-wrong-options-1.rs @@ -1 +1 @@ -// compile-flags: -Z unstable-options --scrape-examples-target-crate foobar +//@ compile-flags: -Z unstable-options --scrape-examples-target-crate foobar diff --git a/tests/rustdoc-ui/scrape-examples/scrape-examples-wrong-options-2.rs b/tests/rustdoc-ui/scrape-examples/scrape-examples-wrong-options-2.rs index 4aacec7f0949..ef270a08f48b 100644 --- a/tests/rustdoc-ui/scrape-examples/scrape-examples-wrong-options-2.rs +++ b/tests/rustdoc-ui/scrape-examples/scrape-examples-wrong-options-2.rs @@ -1 +1 @@ -// compile-flags: -Z unstable-options --scrape-examples-output-path ex.calls +//@ compile-flags: -Z unstable-options --scrape-examples-output-path ex.calls diff --git a/tests/rustdoc-ui/search-index-generics-recursion-bug-issue-59502.rs b/tests/rustdoc-ui/search-index-generics-recursion-bug-issue-59502.rs index ce51556dd418..d889024802f2 100644 --- a/tests/rustdoc-ui/search-index-generics-recursion-bug-issue-59502.rs +++ b/tests/rustdoc-ui/search-index-generics-recursion-bug-issue-59502.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Minimization of issue #59502 diff --git a/tests/rustdoc-ui/suggestions/html-as-generics.fixed b/tests/rustdoc-ui/suggestions/html-as-generics.fixed index 003542d3855a..6c004b537048 100644 --- a/tests/rustdoc-ui/suggestions/html-as-generics.fixed +++ b/tests/rustdoc-ui/suggestions/html-as-generics.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(rustdoc::invalid_html_tags)] /// This `Vec` thing! diff --git a/tests/rustdoc-ui/suggestions/html-as-generics.rs b/tests/rustdoc-ui/suggestions/html-as-generics.rs index 4254a660b19e..1b54b598b2c1 100644 --- a/tests/rustdoc-ui/suggestions/html-as-generics.rs +++ b/tests/rustdoc-ui/suggestions/html-as-generics.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![deny(rustdoc::invalid_html_tags)] /// This Vec thing! diff --git a/tests/rustdoc-ui/super-glob-40936.rs b/tests/rustdoc-ui/super-glob-40936.rs index a06e977b10a5..75dd40bb37a5 100644 --- a/tests/rustdoc-ui/super-glob-40936.rs +++ b/tests/rustdoc-ui/super-glob-40936.rs @@ -1,6 +1,6 @@ -// aux-build:issue-40936.rs -// check-pass -// build-aux-docs +//@ aux-build:issue-40936.rs +//@ check-pass +//@ build-aux-docs // https://github.com/rust-lang/rust/issues/40936 diff --git a/tests/rustdoc-ui/track-diagnostics.rs b/tests/rustdoc-ui/track-diagnostics.rs index fcc50a7aba07..75f2517a408a 100644 --- a/tests/rustdoc-ui/track-diagnostics.rs +++ b/tests/rustdoc-ui/track-diagnostics.rs @@ -1,9 +1,9 @@ -// compile-flags: -Z track-diagnostics -// error-pattern: created at +//@ compile-flags: -Z track-diagnostics +//@ error-pattern: created at // Normalize the emitted location so this doesn't need // updating everytime someone adds or removes a line. -// normalize-stderr-test ".rs:\d+:\d+" -> ".rs:LL:CC" +//@ normalize-stderr-test ".rs:\d+:\d+" -> ".rs:LL:CC" struct A; struct B; diff --git a/tests/rustdoc-ui/unused-extern-crate.rs b/tests/rustdoc-ui/unused-extern-crate.rs index f703a1837907..240dd1f00e22 100644 --- a/tests/rustdoc-ui/unused-extern-crate.rs +++ b/tests/rustdoc-ui/unused-extern-crate.rs @@ -1,3 +1,3 @@ -// check-pass -// aux-crate:panic_item=panic-item.rs +//@ check-pass +//@ aux-crate:panic_item=panic-item.rs // @has unused_extern_crate/index.html diff --git a/tests/rustdoc-ui/use_both_out_dir_and_output_options.rs b/tests/rustdoc-ui/use_both_out_dir_and_output_options.rs index 5037043f19ad..62d3d955855e 100644 --- a/tests/rustdoc-ui/use_both_out_dir_and_output_options.rs +++ b/tests/rustdoc-ui/use_both_out_dir_and_output_options.rs @@ -1 +1 @@ -// compile-flags: --output ./foo +//@ compile-flags: --output ./foo diff --git a/tests/rustdoc-ui/wasm-safe.rs b/tests/rustdoc-ui/wasm-safe.rs index ba971342b46f..6ee5e0b99ff3 100644 --- a/tests/rustdoc-ui/wasm-safe.rs +++ b/tests/rustdoc-ui/wasm-safe.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #[cfg(any(target_arch = "wasm32", doc))] #[target_feature(enable = "simd128")] diff --git a/tests/rustdoc/alias-reexport.rs b/tests/rustdoc/alias-reexport.rs index 4003ecec21cb..0f77d8b3f96f 100644 --- a/tests/rustdoc/alias-reexport.rs +++ b/tests/rustdoc/alias-reexport.rs @@ -1,5 +1,5 @@ -// aux-build:alias-reexport.rs -// aux-build:alias-reexport2.rs +//@ aux-build:alias-reexport.rs +//@ aux-build:alias-reexport2.rs #![crate_name = "foo"] #![feature(lazy_type_alias)] diff --git a/tests/rustdoc/alias-reexport2.rs b/tests/rustdoc/alias-reexport2.rs index 5f6357ad1286..60b7a5f9b83d 100644 --- a/tests/rustdoc/alias-reexport2.rs +++ b/tests/rustdoc/alias-reexport2.rs @@ -1,5 +1,5 @@ // gate-test-lazy_type_alias -// aux-build:alias-reexport.rs +//@ aux-build:alias-reexport.rs #![crate_name = "foo"] #![feature(lazy_type_alias)] diff --git a/tests/rustdoc/asm-foreign2.rs b/tests/rustdoc/asm-foreign2.rs index 87306901eb77..c3b194b16604 100644 --- a/tests/rustdoc/asm-foreign2.rs +++ b/tests/rustdoc/asm-foreign2.rs @@ -1,4 +1,4 @@ -// only-aarch64 +//@ only-aarch64 // Make sure rustdoc accepts options(att_syntax) asm! on non-x86 targets. use std::arch::asm; diff --git a/tests/rustdoc/assoc-type-bindings-20646.rs b/tests/rustdoc/assoc-type-bindings-20646.rs index 375b5b5b23ea..3d752551d1b6 100644 --- a/tests/rustdoc/assoc-type-bindings-20646.rs +++ b/tests/rustdoc/assoc-type-bindings-20646.rs @@ -1,5 +1,5 @@ -// aux-build:issue-20646.rs -// ignore-cross-compile +//@ aux-build:issue-20646.rs +//@ ignore-cross-compile // https://github.com/rust-lang/rust/issues/20646 #![crate_name="issue_20646"] diff --git a/tests/rustdoc/async-fn-opaque-item.rs b/tests/rustdoc/async-fn-opaque-item.rs index 2c030824fe7b..566c1c233ce7 100644 --- a/tests/rustdoc/async-fn-opaque-item.rs +++ b/tests/rustdoc/async-fn-opaque-item.rs @@ -1,5 +1,5 @@ -// compile-flags: --document-private-items --crate-type=lib -// edition: 2021 +//@ compile-flags: --document-private-items --crate-type=lib +//@ edition: 2021 // Issue 109931 -- test against accidentally documenting the `impl Future` // that comes from an async fn desugaring. diff --git a/tests/rustdoc/async-fn.rs b/tests/rustdoc/async-fn.rs index b3c35c8c3f30..010263f6ad31 100644 --- a/tests/rustdoc/async-fn.rs +++ b/tests/rustdoc/async-fn.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // @has async_fn/fn.foo.html '//pre[@class="rust item-decl"]' 'pub async fn foo() -> Option' pub async fn foo() -> Option { None diff --git a/tests/rustdoc/async-move-doctest.rs b/tests/rustdoc/async-move-doctest.rs index 2ba61388c9e3..e18ec353533d 100644 --- a/tests/rustdoc/async-move-doctest.rs +++ b/tests/rustdoc/async-move-doctest.rs @@ -1,5 +1,5 @@ -// compile-flags:--test -// edition:2018 +//@ compile-flags:--test +//@ edition:2018 // Prior to setting the default edition for the doctest pre-parser, // this doctest would fail due to a fatal parsing error. diff --git a/tests/rustdoc/async-trait-sig.rs b/tests/rustdoc/async-trait-sig.rs index db1848f716d9..40e68ce9b3c5 100644 --- a/tests/rustdoc/async-trait-sig.rs +++ b/tests/rustdoc/async-trait-sig.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![allow(incomplete_features)] diff --git a/tests/rustdoc/async-trait.rs b/tests/rustdoc/async-trait.rs index 8de95aac22cb..980a812815b8 100644 --- a/tests/rustdoc/async-trait.rs +++ b/tests/rustdoc/async-trait.rs @@ -1,5 +1,5 @@ -// aux-build:async-trait-dep.rs -// edition:2021 +//@ aux-build:async-trait-dep.rs +//@ edition:2021 #![allow(incomplete_features)] diff --git a/tests/rustdoc/auto-traits.rs b/tests/rustdoc/auto-traits.rs index 93d4bf2f656a..01439c8601b4 100644 --- a/tests/rustdoc/auto-traits.rs +++ b/tests/rustdoc/auto-traits.rs @@ -1,4 +1,4 @@ -// aux-build:auto-traits.rs +//@ aux-build:auto-traits.rs #![feature(auto_traits)] diff --git a/tests/rustdoc/auxiliary/async-trait-dep.rs b/tests/rustdoc/auxiliary/async-trait-dep.rs index d455ee99e093..d89ec6d2998f 100644 --- a/tests/rustdoc/auxiliary/async-trait-dep.rs +++ b/tests/rustdoc/auxiliary/async-trait-dep.rs @@ -1,4 +1,4 @@ -// edition:2021 +//@ edition:2021 #![allow(incomplete_features)] diff --git a/tests/rustdoc/auxiliary/external-macro-src.rs b/tests/rustdoc/auxiliary/external-macro-src.rs index ce20ca5c91e6..79df5dc98eba 100644 --- a/tests/rustdoc/auxiliary/external-macro-src.rs +++ b/tests/rustdoc/auxiliary/external-macro-src.rs @@ -1,4 +1,4 @@ -// compile-flags:--remap-path-prefix={{src-base}}=/does-not-exist +//@ compile-flags:--remap-path-prefix={{src-base}}=/does-not-exist #![doc(html_root_url = "https://example.com/")] diff --git a/tests/rustdoc/auxiliary/inline-default-methods.rs b/tests/rustdoc/auxiliary/inline-default-methods.rs index f06a20b27dce..10f8676e5afe 100644 --- a/tests/rustdoc/auxiliary/inline-default-methods.rs +++ b/tests/rustdoc/auxiliary/inline-default-methods.rs @@ -1,4 +1,4 @@ -// compile-flags: -Cmetadata=aux +//@ compile-flags: -Cmetadata=aux pub trait Foo { fn bar(&self); diff --git a/tests/rustdoc/auxiliary/issue-13698.rs b/tests/rustdoc/auxiliary/issue-13698.rs index a65ebfe36a49..5e5381e0d07a 100644 --- a/tests/rustdoc/auxiliary/issue-13698.rs +++ b/tests/rustdoc/auxiliary/issue-13698.rs @@ -1,4 +1,4 @@ -// compile-flags: -Cmetadata=aux +//@ compile-flags: -Cmetadata=aux pub trait Foo { #[doc(hidden)] diff --git a/tests/rustdoc/auxiliary/issue-15318.rs b/tests/rustdoc/auxiliary/issue-15318.rs index a2f426c6352e..d3dc89113fc5 100644 --- a/tests/rustdoc/auxiliary/issue-15318.rs +++ b/tests/rustdoc/auxiliary/issue-15318.rs @@ -1,5 +1,5 @@ -// no-prefer-dynamic -// compile-flags: -Cmetadata=aux +//@ no-prefer-dynamic +//@ compile-flags: -Cmetadata=aux #![crate_type = "rlib"] #![doc(html_root_url = "http://example.com/")] #![feature(rustc_attrs)] diff --git a/tests/rustdoc/auxiliary/issue-17476.rs b/tests/rustdoc/auxiliary/issue-17476.rs index 80c915eb7cfa..0a63b893fffc 100644 --- a/tests/rustdoc/auxiliary/issue-17476.rs +++ b/tests/rustdoc/auxiliary/issue-17476.rs @@ -1,4 +1,4 @@ -// compile-flags: -Cmetadata=aux +//@ compile-flags: -Cmetadata=aux #![doc(html_root_url = "http://example.com")] diff --git a/tests/rustdoc/auxiliary/issue-19190-3.rs b/tests/rustdoc/auxiliary/issue-19190-3.rs index 8c526a89a882..d3567e3146a7 100644 --- a/tests/rustdoc/auxiliary/issue-19190-3.rs +++ b/tests/rustdoc/auxiliary/issue-19190-3.rs @@ -1,4 +1,4 @@ -// compile-flags: -Cmetadata=aux +//@ compile-flags: -Cmetadata=aux use std::ops::Deref; diff --git a/tests/rustdoc/auxiliary/issue-20646.rs b/tests/rustdoc/auxiliary/issue-20646.rs index 8e16f2de0d97..d1df1defb055 100644 --- a/tests/rustdoc/auxiliary/issue-20646.rs +++ b/tests/rustdoc/auxiliary/issue-20646.rs @@ -1,4 +1,4 @@ -// compile-flags: -Cmetadata=aux +//@ compile-flags: -Cmetadata=aux pub trait Trait { type Output; diff --git a/tests/rustdoc/auxiliary/issue-20727.rs b/tests/rustdoc/auxiliary/issue-20727.rs index 7ffc1985b058..a102d1a4897c 100644 --- a/tests/rustdoc/auxiliary/issue-20727.rs +++ b/tests/rustdoc/auxiliary/issue-20727.rs @@ -1,4 +1,4 @@ -// compile-flags: -Cmetadata=aux +//@ compile-flags: -Cmetadata=aux pub trait Deref { type Target: ?Sized; diff --git a/tests/rustdoc/auxiliary/issue-21092.rs b/tests/rustdoc/auxiliary/issue-21092.rs index 51ab7de1c546..49522e0d4b5a 100644 --- a/tests/rustdoc/auxiliary/issue-21092.rs +++ b/tests/rustdoc/auxiliary/issue-21092.rs @@ -1,4 +1,4 @@ -// compile-flags: -Cmetadata=aux +//@ compile-flags: -Cmetadata=aux pub trait Foo { type Bar; diff --git a/tests/rustdoc/auxiliary/issue-22025.rs b/tests/rustdoc/auxiliary/issue-22025.rs index 5346c0e92bde..6bc550732837 100644 --- a/tests/rustdoc/auxiliary/issue-22025.rs +++ b/tests/rustdoc/auxiliary/issue-22025.rs @@ -1,4 +1,4 @@ -// compile-flags: -Cmetadata=aux +//@ compile-flags: -Cmetadata=aux pub mod foo { diff --git a/tests/rustdoc/auxiliary/issue-57180.rs b/tests/rustdoc/auxiliary/issue-57180.rs index 4e2f4b87c020..cd905b7a5986 100644 --- a/tests/rustdoc/auxiliary/issue-57180.rs +++ b/tests/rustdoc/auxiliary/issue-57180.rs @@ -1,4 +1,4 @@ -// compile-flags: -Cmetadata=aux +//@ compile-flags: -Cmetadata=aux pub trait Trait { } diff --git a/tests/rustdoc/auxiliary/issue-73061.rs b/tests/rustdoc/auxiliary/issue-73061.rs index 01e9a984d440..9a2e4aaf75e4 100644 --- a/tests/rustdoc/auxiliary/issue-73061.rs +++ b/tests/rustdoc/auxiliary/issue-73061.rs @@ -1,4 +1,4 @@ -//edition:2018 +//@edition:2018 #![feature(impl_trait_in_assoc_type)] diff --git a/tests/rustdoc/auxiliary/macro_pub_in_module.rs b/tests/rustdoc/auxiliary/macro_pub_in_module.rs index 137b12386007..81efa1db536b 100644 --- a/tests/rustdoc/auxiliary/macro_pub_in_module.rs +++ b/tests/rustdoc/auxiliary/macro_pub_in_module.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(decl_macro)] #![crate_name = "external_crate"] diff --git a/tests/rustdoc/auxiliary/mod-stackoverflow.rs b/tests/rustdoc/auxiliary/mod-stackoverflow.rs index e0b90f180ee2..428fedfab663 100644 --- a/tests/rustdoc/auxiliary/mod-stackoverflow.rs +++ b/tests/rustdoc/auxiliary/mod-stackoverflow.rs @@ -1,4 +1,4 @@ -// compile-flags: -Cmetadata=aux +//@ compile-flags: -Cmetadata=aux pub mod tree { pub use tree; diff --git a/tests/rustdoc/auxiliary/primitive-doc.rs b/tests/rustdoc/auxiliary/primitive-doc.rs index d1785e423911..a7253ed2450b 100644 --- a/tests/rustdoc/auxiliary/primitive-doc.rs +++ b/tests/rustdoc/auxiliary/primitive-doc.rs @@ -1,4 +1,4 @@ -// compile-flags: --crate-type lib --edition 2018 +//@ compile-flags: --crate-type lib --edition 2018 #![feature(rustc_attrs)] #![feature(no_core)] diff --git a/tests/rustdoc/auxiliary/primitive-reexport.rs b/tests/rustdoc/auxiliary/primitive-reexport.rs index b2e9fa43b395..18b57037634d 100644 --- a/tests/rustdoc/auxiliary/primitive-reexport.rs +++ b/tests/rustdoc/auxiliary/primitive-reexport.rs @@ -1,4 +1,4 @@ -// compile-flags: --emit metadata --crate-type lib --edition 2018 +//@ compile-flags: --emit metadata --crate-type lib --edition 2018 #![crate_name = "foo"] diff --git a/tests/rustdoc/auxiliary/real_gimli.rs b/tests/rustdoc/auxiliary/real_gimli.rs index 80d5c4ba8bb0..871d9b31be9e 100644 --- a/tests/rustdoc/auxiliary/real_gimli.rs +++ b/tests/rustdoc/auxiliary/real_gimli.rs @@ -1,4 +1,4 @@ -// aux-build:realcore.rs +//@ aux-build:realcore.rs #![crate_name = "real_gimli"] #![feature(staged_api, extremely_unstable)] diff --git a/tests/rustdoc/check-source-code-urls-to-def-std.rs b/tests/rustdoc/check-source-code-urls-to-def-std.rs index e12d8445f4fa..fac2a94b8150 100644 --- a/tests/rustdoc/check-source-code-urls-to-def-std.rs +++ b/tests/rustdoc/check-source-code-urls-to-def-std.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zunstable-options --generate-link-to-definition +//@ compile-flags: -Zunstable-options --generate-link-to-definition #![crate_name = "foo"] diff --git a/tests/rustdoc/check-source-code-urls-to-def.rs b/tests/rustdoc/check-source-code-urls-to-def.rs index c31c579030e0..30638992ac71 100644 --- a/tests/rustdoc/check-source-code-urls-to-def.rs +++ b/tests/rustdoc/check-source-code-urls-to-def.rs @@ -1,6 +1,6 @@ -// compile-flags: -Zunstable-options --generate-link-to-definition -// aux-build:source_code.rs -// build-aux-docs +//@ compile-flags: -Zunstable-options --generate-link-to-definition +//@ aux-build:source_code.rs +//@ build-aux-docs #![feature(rustc_attrs)] diff --git a/tests/rustdoc/check.rs b/tests/rustdoc/check.rs index 1fb4b35ddbe8..9ca85a123f76 100644 --- a/tests/rustdoc/check.rs +++ b/tests/rustdoc/check.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z unstable-options --check +//@ compile-flags: -Z unstable-options --check // @!has check/fn.foo.html // @!has check/index.html diff --git a/tests/rustdoc/comment-in-doctest.rs b/tests/rustdoc/comment-in-doctest.rs index 5691d173569a..e580aa2bb72c 100644 --- a/tests/rustdoc/comment-in-doctest.rs +++ b/tests/rustdoc/comment-in-doctest.rs @@ -1,4 +1,4 @@ -// compile-flags:--test +//@ compile-flags:--test // comments, both doc comments and regular ones, used to trick rustdoc's doctest parser into // thinking that everything after it was part of the regular program. combined with the librustc_ast diff --git a/tests/rustdoc/const-generics/auxiliary/extern_crate.rs b/tests/rustdoc/const-generics/auxiliary/extern_crate.rs index 55b632a48f2e..ebd0d7dac32b 100644 --- a/tests/rustdoc/const-generics/auxiliary/extern_crate.rs +++ b/tests/rustdoc/const-generics/auxiliary/extern_crate.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 pub fn extern_fn() -> impl Iterator { [[0; N]; N].iter().copied() } diff --git a/tests/rustdoc/const-generics/const-generics-docs.rs b/tests/rustdoc/const-generics/const-generics-docs.rs index 70a9518f05b4..4ef1acf45f54 100644 --- a/tests/rustdoc/const-generics/const-generics-docs.rs +++ b/tests/rustdoc/const-generics/const-generics-docs.rs @@ -1,5 +1,5 @@ -// edition:2018 -// aux-build: extern_crate.rs +//@ edition:2018 +//@ aux-build: extern_crate.rs #![crate_name = "foo"] extern crate extern_crate; diff --git a/tests/rustdoc/const-underscore.rs b/tests/rustdoc/const-underscore.rs index 0d4809409f3a..f7f15e548312 100644 --- a/tests/rustdoc/const-underscore.rs +++ b/tests/rustdoc/const-underscore.rs @@ -1,4 +1,4 @@ -// compile-flags: --document-private-items +//@ compile-flags: --document-private-items // @!has const_underscore/constant._.html const _: () = { diff --git a/tests/rustdoc/crate-version-escape.rs b/tests/rustdoc/crate-version-escape.rs index f134d9baa7d5..a8f9e7eee7b8 100644 --- a/tests/rustdoc/crate-version-escape.rs +++ b/tests/rustdoc/crate-version-escape.rs @@ -1,4 +1,4 @@ -// compile-flags: --crate-version= -Z unstable-options +//@ compile-flags: --crate-version= -Z unstable-options #![crate_name = "foo"] diff --git a/tests/rustdoc/crate-version-extra.rs b/tests/rustdoc/crate-version-extra.rs index 72a2c4ba5f72..4e215b86dee7 100644 --- a/tests/rustdoc/crate-version-extra.rs +++ b/tests/rustdoc/crate-version-extra.rs @@ -1,4 +1,4 @@ -// compile-flags: '--crate-version=1.3.37-nightly (203c57dbe 2023-09-17)' +//@ compile-flags: '--crate-version=1.3.37-nightly (203c57dbe 2023-09-17)' #![crate_name="foo"] diff --git a/tests/rustdoc/crate-version.rs b/tests/rustdoc/crate-version.rs index d4be845b71ee..7095bf54c13b 100644 --- a/tests/rustdoc/crate-version.rs +++ b/tests/rustdoc/crate-version.rs @@ -1,3 +1,3 @@ -// compile-flags: --crate-version=1.3.37 +//@ compile-flags: --crate-version=1.3.37 // @has 'crate_version/index.html' '//*[@class="version"]' '1.3.37' diff --git a/tests/rustdoc/cross-crate-hidden-assoc-trait-items.rs b/tests/rustdoc/cross-crate-hidden-assoc-trait-items.rs index d02bc4fe7125..22630705e1e8 100644 --- a/tests/rustdoc/cross-crate-hidden-assoc-trait-items.rs +++ b/tests/rustdoc/cross-crate-hidden-assoc-trait-items.rs @@ -2,8 +2,8 @@ // Hide cross-crate `#[doc(hidden)]` associated items in trait impls. #![crate_name = "dependent"] -// edition:2021 -// aux-crate:dependency=cross-crate-hidden-assoc-trait-items.rs +//@ edition:2021 +//@ aux-crate:dependency=cross-crate-hidden-assoc-trait-items.rs // The trait `Tr` contains 2 hidden and 2 visisible associated items. // Instead of checking for the absence of the hidden items, check for the presence of the diff --git a/tests/rustdoc/cross-crate-hidden-impl-parameter.rs b/tests/rustdoc/cross-crate-hidden-impl-parameter.rs index eb2ced2f7f41..69f9ca132fd1 100644 --- a/tests/rustdoc/cross-crate-hidden-impl-parameter.rs +++ b/tests/rustdoc/cross-crate-hidden-impl-parameter.rs @@ -1,7 +1,7 @@ // Issue #86448: test for cross-crate `doc(hidden)` #![crate_name = "foo"] -// aux-build:cross-crate-hidden-impl-parameter.rs +//@ aux-build:cross-crate-hidden-impl-parameter.rs extern crate cross_crate_hidden_impl_parameter; pub use ::cross_crate_hidden_impl_parameter::{HiddenType, HiddenTrait}; // OK, not re-exported diff --git a/tests/rustdoc/cross-crate-links.rs b/tests/rustdoc/cross-crate-links.rs index 7c736a4cc115..36e8f31dfc67 100644 --- a/tests/rustdoc/cross-crate-links.rs +++ b/tests/rustdoc/cross-crate-links.rs @@ -1,5 +1,5 @@ -// aux-build:all-item-types.rs -// build-aux-docs +//@ aux-build:all-item-types.rs +//@ build-aux-docs #![crate_name = "foo"] diff --git a/tests/rustdoc/cross-crate-primitive-doc.rs b/tests/rustdoc/cross-crate-primitive-doc.rs index 4ba296ee04a1..01a4c4ef8e42 100644 --- a/tests/rustdoc/cross-crate-primitive-doc.rs +++ b/tests/rustdoc/cross-crate-primitive-doc.rs @@ -1,6 +1,6 @@ -// aux-build:primitive-doc.rs -// compile-flags: --extern-html-root-url=primitive_doc=../ -Z unstable-options -// only-linux +//@ aux-build:primitive-doc.rs +//@ compile-flags: --extern-html-root-url=primitive_doc=../ -Z unstable-options +//@ only-linux #![feature(no_core)] #![no_core] diff --git a/tests/rustdoc/decl_macro.rs b/tests/rustdoc/decl_macro.rs index 94ade31b5e5f..116fa15d7493 100644 --- a/tests/rustdoc/decl_macro.rs +++ b/tests/rustdoc/decl_macro.rs @@ -1,4 +1,4 @@ -// compile-flags: --document-private-items +//@ compile-flags: --document-private-items #![feature(decl_macro)] diff --git a/tests/rustdoc/decl_macro_priv.rs b/tests/rustdoc/decl_macro_priv.rs index 4e1279e34d93..2a890e739f2b 100644 --- a/tests/rustdoc/decl_macro_priv.rs +++ b/tests/rustdoc/decl_macro_priv.rs @@ -1,4 +1,4 @@ -// compile-flags: --document-private-items +//@ compile-flags: --document-private-items #![feature(decl_macro)] diff --git a/tests/rustdoc/deduplicate-trait-impl-22025.rs b/tests/rustdoc/deduplicate-trait-impl-22025.rs index 65a556e3a70f..7b1648a56ac1 100644 --- a/tests/rustdoc/deduplicate-trait-impl-22025.rs +++ b/tests/rustdoc/deduplicate-trait-impl-22025.rs @@ -1,5 +1,5 @@ -// aux-build:issue-22025.rs -// ignore-cross-compile +//@ aux-build:issue-22025.rs +//@ ignore-cross-compile // https://github.com/rust-lang/rust/issues/22025 #![crate_name="issue_22025"] diff --git a/tests/rustdoc/default-impl.rs b/tests/rustdoc/default-impl.rs index f11b3b29b937..2ba9c4ab5ad9 100644 --- a/tests/rustdoc/default-impl.rs +++ b/tests/rustdoc/default-impl.rs @@ -1,5 +1,5 @@ -// aux-build:rustdoc-default-impl.rs -// ignore-cross-compile +//@ aux-build:rustdoc-default-impl.rs +//@ ignore-cross-compile extern crate rustdoc_default_impl as foo; diff --git a/tests/rustdoc/default-theme.rs b/tests/rustdoc/default-theme.rs index ecb8f0b3b487..4167086807c2 100644 --- a/tests/rustdoc/default-theme.rs +++ b/tests/rustdoc/default-theme.rs @@ -1,4 +1,4 @@ -// compile-flags: --default-theme ayu +//@ compile-flags: --default-theme ayu // @has default_theme/index.html // @has - '//script[@id="default-settings"]/@data-theme' 'ayu' diff --git a/tests/rustdoc/demo-allocator-54478.rs b/tests/rustdoc/demo-allocator-54478.rs index 39acee36d889..dd98e80f03ad 100644 --- a/tests/rustdoc/demo-allocator-54478.rs +++ b/tests/rustdoc/demo-allocator-54478.rs @@ -15,7 +15,7 @@ // decided to change `rustdoc` to behave more like the compiler's // default setting, by leaving off `-C prefer-dynamic`. -// compile-flags:--test +//@ compile-flags:--test //! This is a doc comment //! diff --git a/tests/rustdoc/deref-methods-19190-inline.rs b/tests/rustdoc/deref-methods-19190-inline.rs index 619b268d68b3..ef31cc70d935 100644 --- a/tests/rustdoc/deref-methods-19190-inline.rs +++ b/tests/rustdoc/deref-methods-19190-inline.rs @@ -1,5 +1,5 @@ -// aux-build:issue-19190-3.rs -// ignore-cross-compile +//@ aux-build:issue-19190-3.rs +//@ ignore-cross-compile // https://github.com/rust-lang/rust/issues/19190 #![crate_name="issue_19190_3"] diff --git a/tests/rustdoc/display-hidden-items.rs b/tests/rustdoc/display-hidden-items.rs index d97d5b4a9688..76124554767f 100644 --- a/tests/rustdoc/display-hidden-items.rs +++ b/tests/rustdoc/display-hidden-items.rs @@ -1,5 +1,5 @@ // Test to ensure that the `--document-hidden-items` option is working as expected. -// compile-flags: -Z unstable-options --document-hidden-items +//@ compile-flags: -Z unstable-options --document-hidden-items // ignore-tidy-linelength #![crate_name = "foo"] diff --git a/tests/rustdoc/doc-cfg-hide.rs b/tests/rustdoc/doc-cfg-hide.rs index 636957fe9980..f80453d50ed0 100644 --- a/tests/rustdoc/doc-cfg-hide.rs +++ b/tests/rustdoc/doc-cfg-hide.rs @@ -5,7 +5,7 @@ // @has 'oud/struct.Solecism.html' // @count - '//*[@class="stab portability"]' 0 -// compile-flags:--cfg feature="solecism" +//@ compile-flags:--cfg feature="solecism" #[cfg(feature = "solecism")] pub struct Solecism; @@ -19,7 +19,7 @@ pub struct Scribacious; // @has 'oud/struct.Hyperdulia.html' // @count - '//*[@class="stab portability"]' 1 // @matches - '//*[@class="stab portability"]' 'crate feature hyperdulia' -// compile-flags:--cfg feature="hyperdulia" +//@ compile-flags:--cfg feature="hyperdulia" #[cfg(feature = "solecism")] #[cfg(feature = "hyperdulia")] pub struct Hyperdulia; @@ -27,6 +27,6 @@ pub struct Hyperdulia; // @has 'oud/struct.Oystercatcher.html' // @count - '//*[@class="stab portability"]' 1 // @matches - '//*[@class="stab portability"]' 'crate feature oystercatcher only' -// compile-flags:--cfg feature="oystercatcher" +//@ compile-flags:--cfg feature="oystercatcher" #[cfg(all(feature = "solecism", feature = "oystercatcher"))] pub struct Oystercatcher; diff --git a/tests/rustdoc/doc-cfg-implicit-gate.rs b/tests/rustdoc/doc-cfg-implicit-gate.rs index 92804d3729bb..15de15c0ce22 100644 --- a/tests/rustdoc/doc-cfg-implicit-gate.rs +++ b/tests/rustdoc/doc-cfg-implicit-gate.rs @@ -1,4 +1,4 @@ -// compile-flags:--cfg feature="worricow" +//@ compile-flags:--cfg feature="worricow" #![crate_name = "xenogenous"] // @has 'xenogenous/struct.Worricow.html' diff --git a/tests/rustdoc/doc-cfg-implicit.rs b/tests/rustdoc/doc-cfg-implicit.rs index 5d17a4ede6ad..a6c0896db317 100644 --- a/tests/rustdoc/doc-cfg-implicit.rs +++ b/tests/rustdoc/doc-cfg-implicit.rs @@ -4,28 +4,28 @@ // @has 'funambulism/struct.Disorbed.html' // @count - '//*[@class="stab portability"]' 1 // @matches - '//*[@class="stab portability"]' 'crate feature disorbed' -// compile-flags:--cfg feature="disorbed" +//@ compile-flags:--cfg feature="disorbed" #[cfg(feature = "disorbed")] pub struct Disorbed; // @has 'funambulism/struct.Aesthesia.html' // @count - '//*[@class="stab portability"]' 1 // @matches - '//*[@class="stab portability"]' 'crate feature aesthesia' -// compile-flags:--cfg feature="aesthesia" +//@ compile-flags:--cfg feature="aesthesia" #[doc(cfg(feature = "aesthesia"))] pub struct Aesthesia; // @has 'funambulism/struct.Pliothermic.html' // @count - '//*[@class="stab portability"]' 1 // @matches - '//*[@class="stab portability"]' 'crate feature pliothermic' -// compile-flags:--cfg feature="epopoeist" +//@ compile-flags:--cfg feature="epopoeist" #[cfg(feature = "epopoeist")] #[doc(cfg(feature = "pliothermic"))] pub struct Pliothermic; // @has 'funambulism/struct.Simillimum.html' // @count - '//*[@class="stab portability"]' 0 -// compile-flags:--cfg feature="simillimum" +//@ compile-flags:--cfg feature="simillimum" #[cfg(feature = "simillimum")] #[doc(cfg(all()))] pub struct Simillimum; diff --git a/tests/rustdoc/doc-cfg-target-feature.rs b/tests/rustdoc/doc-cfg-target-feature.rs index 98d230c978b7..b66e86e36af8 100644 --- a/tests/rustdoc/doc-cfg-target-feature.rs +++ b/tests/rustdoc/doc-cfg-target-feature.rs @@ -1,6 +1,6 @@ -// only-x86_64 -// compile-flags:--test -// should-fail +//@ only-x86_64 +//@ compile-flags:--test +//@ should-fail // #49723: rustdoc didn't add target features when extracting or running doctests diff --git a/tests/rustdoc/doc-hidden-method-13698.rs b/tests/rustdoc/doc-hidden-method-13698.rs index f1bd6e73babd..44bf8bfd8d2f 100644 --- a/tests/rustdoc/doc-hidden-method-13698.rs +++ b/tests/rustdoc/doc-hidden-method-13698.rs @@ -1,5 +1,5 @@ -// aux-build:issue-13698.rs -// ignore-cross-compile +//@ aux-build:issue-13698.rs +//@ ignore-cross-compile // https://github.com/rust-lang/rust/issues/13698 #![crate_name="issue_13698"] diff --git a/tests/rustdoc/doc-test-attr-18199.rs b/tests/rustdoc/doc-test-attr-18199.rs index c9d2235321c8..64016e32eeeb 100644 --- a/tests/rustdoc/doc-test-attr-18199.rs +++ b/tests/rustdoc/doc-test-attr-18199.rs @@ -1,4 +1,4 @@ -// compile-flags:--test +//@ compile-flags:--test // https://github.com/rust-lang/rust/issues/18199 #![doc(test(attr(feature(staged_api))))] diff --git a/tests/rustdoc/doctest/doctest-cfg-feature-30252.rs b/tests/rustdoc/doctest/doctest-cfg-feature-30252.rs index ceb8076fe352..0a2e3f3cf958 100644 --- a/tests/rustdoc/doctest/doctest-cfg-feature-30252.rs +++ b/tests/rustdoc/doctest/doctest-cfg-feature-30252.rs @@ -1,4 +1,4 @@ -// compile-flags:--test --cfg feature="bar" +//@ compile-flags:--test --cfg feature="bar" // https://github.com/rust-lang/rust/issues/30252 #![crate_name="issue_30252"] diff --git a/tests/rustdoc/doctest/doctest-crate-attributes-38129.rs b/tests/rustdoc/doctest/doctest-crate-attributes-38129.rs index 156d50fa52a6..b9c837188325 100644 --- a/tests/rustdoc/doctest/doctest-crate-attributes-38129.rs +++ b/tests/rustdoc/doctest/doctest-crate-attributes-38129.rs @@ -1,4 +1,4 @@ -// compile-flags:--test +//@ compile-flags:--test // This file tests the source-partitioning behavior of rustdoc. // Each test contains some code that should be put into the generated diff --git a/tests/rustdoc/doctest/doctest-hide-empty-line-23106.rs b/tests/rustdoc/doctest/doctest-hide-empty-line-23106.rs index 8e1e2cf098cf..2e8a8f3f1e2b 100644 --- a/tests/rustdoc/doctest/doctest-hide-empty-line-23106.rs +++ b/tests/rustdoc/doctest/doctest-hide-empty-line-23106.rs @@ -1,4 +1,4 @@ -// compile-flags:--test +//@ compile-flags:--test // https://github.com/rust-lang/rust/issues/23106 #![crate_name="issue_23106"] diff --git a/tests/rustdoc/doctest/doctest-include-43153.rs b/tests/rustdoc/doctest/doctest-include-43153.rs index ec21a68c4ee5..0f63c84de39b 100644 --- a/tests/rustdoc/doctest/doctest-include-43153.rs +++ b/tests/rustdoc/doctest/doctest-include-43153.rs @@ -3,7 +3,7 @@ // Test that `include!` in a doc test searches relative to the directory in // which the test is declared. -// compile-flags:--test +//@ compile-flags:--test /// ```rust /// include!("auxiliary/empty.rs"); diff --git a/tests/rustdoc/doctest/doctest-macro-38219.rs b/tests/rustdoc/doctest/doctest-macro-38219.rs index 6c81df110856..574e84523783 100644 --- a/tests/rustdoc/doctest/doctest-macro-38219.rs +++ b/tests/rustdoc/doctest/doctest-macro-38219.rs @@ -1,7 +1,7 @@ // https://github.com/rust-lang/rust/issues/38219 -// compile-flags:--test -// should-fail +//@ compile-flags:--test +//@ should-fail /// ``` /// fail diff --git a/tests/rustdoc/doctest/doctest-manual-crate-name.rs b/tests/rustdoc/doctest/doctest-manual-crate-name.rs index 3a5e3734e140..8d526959fe1e 100644 --- a/tests/rustdoc/doctest/doctest-manual-crate-name.rs +++ b/tests/rustdoc/doctest/doctest-manual-crate-name.rs @@ -1,4 +1,4 @@ -// compile-flags:--test +//@ compile-flags:--test //! ``` //! #![crate_name="asdf"] diff --git a/tests/rustdoc/doctest/doctest-markdown-inline-parse-23744.rs b/tests/rustdoc/doctest/doctest-markdown-inline-parse-23744.rs index 128e2daba071..2ba9176ae88c 100644 --- a/tests/rustdoc/doctest/doctest-markdown-inline-parse-23744.rs +++ b/tests/rustdoc/doctest/doctest-markdown-inline-parse-23744.rs @@ -1,4 +1,4 @@ -// compile-flags:--test +//@ compile-flags:--test // https://github.com/rust-lang/rust/issues/23744 #![crate_name="issue_23744"] diff --git a/tests/rustdoc/doctest/doctest-markdown-trailing-docblock-48377.rs b/tests/rustdoc/doctest/doctest-markdown-trailing-docblock-48377.rs index d481dc0dd701..74c1a9d24597 100644 --- a/tests/rustdoc/doctest/doctest-markdown-trailing-docblock-48377.rs +++ b/tests/rustdoc/doctest/doctest-markdown-trailing-docblock-48377.rs @@ -1,4 +1,4 @@ -// compile-flags:--test +//@ compile-flags:--test // https://github.com/rust-lang/rust/issues/48377 diff --git a/tests/rustdoc/doctest/doctest-multi-line-string-literal-25944.rs b/tests/rustdoc/doctest/doctest-multi-line-string-literal-25944.rs index eec796e4fbf2..2b9c6119c67d 100644 --- a/tests/rustdoc/doctest/doctest-multi-line-string-literal-25944.rs +++ b/tests/rustdoc/doctest/doctest-multi-line-string-literal-25944.rs @@ -1,4 +1,4 @@ -// compile-flags:--test +//@ compile-flags:--test // https://github.com/rust-lang/rust/issues/25944 #![crate_name="issue_25944"] diff --git a/tests/rustdoc/document-hidden-items-15347.rs b/tests/rustdoc/document-hidden-items-15347.rs index d8a760e56660..bf3c73f0ba16 100644 --- a/tests/rustdoc/document-hidden-items-15347.rs +++ b/tests/rustdoc/document-hidden-items-15347.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z unstable-options --document-hidden-items +//@ compile-flags: -Z unstable-options --document-hidden-items // https://github.com/rust-lang/rust/issues/15347 #![crate_name="issue_15347"] diff --git a/tests/rustdoc/duplicate-flags.rs b/tests/rustdoc/duplicate-flags.rs index dde36df2cf50..c0df181397b2 100644 --- a/tests/rustdoc/duplicate-flags.rs +++ b/tests/rustdoc/duplicate-flags.rs @@ -1,4 +1,4 @@ -// compile-flags: --document-private-items --document-private-items +//@ compile-flags: --document-private-items --document-private-items // @has duplicate_flags/struct.Private.html struct Private; diff --git a/tests/rustdoc/edition-doctest.rs b/tests/rustdoc/edition-doctest.rs index 6de25996bedd..f43c074f806b 100644 --- a/tests/rustdoc/edition-doctest.rs +++ b/tests/rustdoc/edition-doctest.rs @@ -1,4 +1,4 @@ -// compile-flags:--test +//@ compile-flags:--test /// ```rust,edition2018 /// #![feature(try_blocks)] diff --git a/tests/rustdoc/edition-flag.rs b/tests/rustdoc/edition-flag.rs index e54c7d2969bf..c57c8d50b235 100644 --- a/tests/rustdoc/edition-flag.rs +++ b/tests/rustdoc/edition-flag.rs @@ -1,5 +1,5 @@ -// compile-flags:--test -// edition:2018 +//@ compile-flags:--test +//@ edition:2018 /// ```rust /// fn main() { diff --git a/tests/rustdoc/elided-lifetime.rs b/tests/rustdoc/elided-lifetime.rs index 006132ef8aa4..4df381a6f68b 100644 --- a/tests/rustdoc/elided-lifetime.rs +++ b/tests/rustdoc/elided-lifetime.rs @@ -1,4 +1,4 @@ -// aux-build:elided-lifetime.rs +//@ aux-build:elided-lifetime.rs // // rust-lang/rust#75225 // diff --git a/tests/rustdoc/empty-impl-block-private-with-doc.rs b/tests/rustdoc/empty-impl-block-private-with-doc.rs index e6cff97b1842..21c860c09234 100644 --- a/tests/rustdoc/empty-impl-block-private-with-doc.rs +++ b/tests/rustdoc/empty-impl-block-private-with-doc.rs @@ -1,4 +1,4 @@ -// compile-flags: --document-private-items +//@ compile-flags: --document-private-items #![feature(inherent_associated_types)] #![allow(incomplete_features)] diff --git a/tests/rustdoc/empty-mod-private.rs b/tests/rustdoc/empty-mod-private.rs index 147e11e5882e..7e78aac17641 100644 --- a/tests/rustdoc/empty-mod-private.rs +++ b/tests/rustdoc/empty-mod-private.rs @@ -1,4 +1,4 @@ -// compile-flags: --document-private-items +//@ compile-flags: --document-private-items // @has 'empty_mod_private/index.html' '//a[@href="foo/index.html"]' 'foo' // @hasraw 'empty_mod_private/sidebar-items.js' 'foo' diff --git a/tests/rustdoc/enum-variant-value.rs b/tests/rustdoc/enum-variant-value.rs index 096f8cd4122f..5767d9e54231 100644 --- a/tests/rustdoc/enum-variant-value.rs +++ b/tests/rustdoc/enum-variant-value.rs @@ -1,7 +1,7 @@ // This test ensures that the variant value is displayed with underscores but without // a type name at the end. -// aux-build:enum-variant.rs +//@ aux-build:enum-variant.rs #![crate_name = "foo"] diff --git a/tests/rustdoc/extern-default-method.rs b/tests/rustdoc/extern-default-method.rs index fc28b230a5f7..058c2200d941 100644 --- a/tests/rustdoc/extern-default-method.rs +++ b/tests/rustdoc/extern-default-method.rs @@ -1,5 +1,5 @@ -// aux-build:rustdoc-extern-default-method.rs -// ignore-cross-compile +//@ aux-build:rustdoc-extern-default-method.rs +//@ ignore-cross-compile // ignore-tidy-linelength extern crate rustdoc_extern_default_method as ext; diff --git a/tests/rustdoc/extern-html-root-url-precedence.rs b/tests/rustdoc/extern-html-root-url-precedence.rs index def6767ea47f..68af5ea5e04c 100644 --- a/tests/rustdoc/extern-html-root-url-precedence.rs +++ b/tests/rustdoc/extern-html-root-url-precedence.rs @@ -1,4 +1,4 @@ -// compile-flags:-Z unstable-options --extern-html-root-url core=https://example.com/core/0.1.0 --extern-html-root-takes-precedence +//@ compile-flags:-Z unstable-options --extern-html-root-url core=https://example.com/core/0.1.0 --extern-html-root-takes-precedence // @has extern_html_root_url_precedence/index.html // --extern-html-root should take precedence if `--takes-precedence` is passed diff --git a/tests/rustdoc/extern-html-root-url.rs b/tests/rustdoc/extern-html-root-url.rs index 17eedcf2ab8d..672c460c20b4 100644 --- a/tests/rustdoc/extern-html-root-url.rs +++ b/tests/rustdoc/extern-html-root-url.rs @@ -1,6 +1,6 @@ -// compile-flags:-Z unstable-options --extern-html-root-url html_root=https://example.com/override --extern-html-root-url no_html_root=https://example.com/override -// aux-build:html_root.rs -// aux-build:no_html_root.rs +//@ compile-flags:-Z unstable-options --extern-html-root-url html_root=https://example.com/override --extern-html-root-url no_html_root=https://example.com/override +//@ aux-build:html_root.rs +//@ aux-build:no_html_root.rs // NOTE: intentionally does not build any auxiliary docs extern crate html_root; diff --git a/tests/rustdoc/extern-impl-trait.rs b/tests/rustdoc/extern-impl-trait.rs index 4d8672305a75..9cc235504e71 100644 --- a/tests/rustdoc/extern-impl-trait.rs +++ b/tests/rustdoc/extern-impl-trait.rs @@ -1,4 +1,4 @@ -// aux-build:extern-impl-trait.rs +//@ aux-build:extern-impl-trait.rs #![crate_name = "foo"] diff --git a/tests/rustdoc/extern-links.rs b/tests/rustdoc/extern-links.rs index 0383ccf7db66..a8c6eb76390f 100644 --- a/tests/rustdoc/extern-links.rs +++ b/tests/rustdoc/extern-links.rs @@ -1,5 +1,5 @@ -// aux-build:extern-links.rs -// ignore-cross-compile +//@ aux-build:extern-links.rs +//@ ignore-cross-compile #![crate_name = "foo"] diff --git a/tests/rustdoc/extern-method.rs b/tests/rustdoc/extern-method.rs index 9cf5fc190af0..3a86ad4feb03 100644 --- a/tests/rustdoc/extern-method.rs +++ b/tests/rustdoc/extern-method.rs @@ -1,5 +1,5 @@ -// aux-build:rustdoc-extern-method.rs -// ignore-cross-compile +//@ aux-build:rustdoc-extern-method.rs +//@ ignore-cross-compile #![feature(unboxed_closures)] diff --git a/tests/rustdoc/external-cross.rs b/tests/rustdoc/external-cross.rs index 3f8e16882911..527c81839b55 100644 --- a/tests/rustdoc/external-cross.rs +++ b/tests/rustdoc/external-cross.rs @@ -1,5 +1,5 @@ -// aux-build:external-cross.rs -// ignore-cross-compile +//@ aux-build:external-cross.rs +//@ ignore-cross-compile #![crate_name="host"] diff --git a/tests/rustdoc/external-macro-src.rs b/tests/rustdoc/external-macro-src.rs index 359551ab78d1..1813ecb423f4 100644 --- a/tests/rustdoc/external-macro-src.rs +++ b/tests/rustdoc/external-macro-src.rs @@ -1,4 +1,4 @@ -// aux-build:external-macro-src.rs +//@ aux-build:external-macro-src.rs #![crate_name = "foo"] diff --git a/tests/rustdoc/ffi.rs b/tests/rustdoc/ffi.rs index 8140dfc723c7..c9dbdbf42a51 100644 --- a/tests/rustdoc/ffi.rs +++ b/tests/rustdoc/ffi.rs @@ -1,5 +1,5 @@ -// aux-build:rustdoc-ffi.rs -// ignore-cross-compile +//@ aux-build:rustdoc-ffi.rs +//@ ignore-cross-compile extern crate rustdoc_ffi as lib; diff --git a/tests/rustdoc/force-target-feature.rs b/tests/rustdoc/force-target-feature.rs index b6c10e8341b4..fa71bbeea274 100644 --- a/tests/rustdoc/force-target-feature.rs +++ b/tests/rustdoc/force-target-feature.rs @@ -1,6 +1,6 @@ -// only-x86_64 -// compile-flags:--test -C target-feature=+avx -// should-fail +//@ only-x86_64 +//@ compile-flags:--test -C target-feature=+avx +//@ should-fail /// (written on a spider's web) Some Struct /// diff --git a/tests/rustdoc/hidden-private.rs b/tests/rustdoc/hidden-private.rs index 834ba5231a1e..5e3c7f3a3e42 100644 --- a/tests/rustdoc/hidden-private.rs +++ b/tests/rustdoc/hidden-private.rs @@ -2,7 +2,7 @@ // It ensures that the items in the `doc(hidden)` const block don't show up in the // generated docs. -// compile-flags: --document-private-items +//@ compile-flags: --document-private-items #![crate_name = "foo"] diff --git a/tests/rustdoc/hidden-trait-methods-with-document-hidden-items.rs b/tests/rustdoc/hidden-trait-methods-with-document-hidden-items.rs index 95b3e9b65230..d2269e3b021d 100644 --- a/tests/rustdoc/hidden-trait-methods-with-document-hidden-items.rs +++ b/tests/rustdoc/hidden-trait-methods-with-document-hidden-items.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z unstable-options --document-hidden-items +//@ compile-flags: -Z unstable-options --document-hidden-items // test for trait methods with `doc(hidden)` with `--document-hidden-items` passed. #![crate_name = "foo"] diff --git a/tests/rustdoc/hide-unstable-trait.rs b/tests/rustdoc/hide-unstable-trait.rs index 0bf7cabc43b2..ebf9efb368b6 100644 --- a/tests/rustdoc/hide-unstable-trait.rs +++ b/tests/rustdoc/hide-unstable-trait.rs @@ -1,4 +1,4 @@ -// aux-build:unstable-trait.rs +//@ aux-build:unstable-trait.rs #![crate_name = "foo"] #![feature(private_trait)] diff --git a/tests/rustdoc/html-no-source.rs b/tests/rustdoc/html-no-source.rs index b91aa41207af..b52792837e5b 100644 --- a/tests/rustdoc/html-no-source.rs +++ b/tests/rustdoc/html-no-source.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zunstable-options --html-no-source +//@ compile-flags: -Zunstable-options --html-no-source // This test ensures that the `--html-no-source` flag disables // the creation of the `src` folder. diff --git a/tests/rustdoc/ice-reexport-crate-root-28927.rs b/tests/rustdoc/ice-reexport-crate-root-28927.rs index 26debfc60e46..b4215f7d1aa9 100644 --- a/tests/rustdoc/ice-reexport-crate-root-28927.rs +++ b/tests/rustdoc/ice-reexport-crate-root-28927.rs @@ -1,6 +1,6 @@ -// aux-build:issue-28927-2.rs -// aux-build:issue-28927-1.rs -// ignore-cross-compile +//@ aux-build:issue-28927-2.rs +//@ aux-build:issue-28927-1.rs +//@ ignore-cross-compile // https://github.com/rust-lang/rust/issues/28927 #![crate_name="issue_28927"] diff --git a/tests/rustdoc/ice-type-error-19181.rs b/tests/rustdoc/ice-type-error-19181.rs index 3ced61366640..02c640476222 100644 --- a/tests/rustdoc/ice-type-error-19181.rs +++ b/tests/rustdoc/ice-type-error-19181.rs @@ -1,4 +1,4 @@ -// compile-flags:--test +//@ compile-flags:--test // https://github.com/rust-lang/rust/issues/19181 // rustdoc should not panic when target crate has compilation errors diff --git a/tests/rustdoc/impl-assoc-type-21092.rs b/tests/rustdoc/impl-assoc-type-21092.rs index f01f098a92f5..2354fb986e7e 100644 --- a/tests/rustdoc/impl-assoc-type-21092.rs +++ b/tests/rustdoc/impl-assoc-type-21092.rs @@ -1,5 +1,5 @@ -// aux-build:issue-21092.rs -// ignore-cross-compile +//@ aux-build:issue-21092.rs +//@ ignore-cross-compile // https://github.com/rust-lang/rust/issues/21092 #![crate_name="issue_21092"] diff --git a/tests/rustdoc/impl-blanket-53689.rs b/tests/rustdoc/impl-blanket-53689.rs index 7c2edd01a609..63bce550b9bc 100644 --- a/tests/rustdoc/impl-blanket-53689.rs +++ b/tests/rustdoc/impl-blanket-53689.rs @@ -1,5 +1,5 @@ // https://github.com/rust-lang/rust/issues/53689 -// aux-build:issue-53689.rs +//@ aux-build:issue-53689.rs #![crate_name = "foo"] diff --git a/tests/rustdoc/impl-parts-crosscrate.rs b/tests/rustdoc/impl-parts-crosscrate.rs index da109ea70900..2cca3a5c37c6 100644 --- a/tests/rustdoc/impl-parts-crosscrate.rs +++ b/tests/rustdoc/impl-parts-crosscrate.rs @@ -1,5 +1,5 @@ -// aux-build:rustdoc-impl-parts-crosscrate.rs -// ignore-cross-compile +//@ aux-build:rustdoc-impl-parts-crosscrate.rs +//@ ignore-cross-compile #![feature(negative_impls)] diff --git a/tests/rustdoc/index-page.rs b/tests/rustdoc/index-page.rs index fc755afda4a9..51354c8b25b9 100644 --- a/tests/rustdoc/index-page.rs +++ b/tests/rustdoc/index-page.rs @@ -1,6 +1,6 @@ -// aux-build:all-item-types.rs -// build-aux-docs -// compile-flags: -Z unstable-options --enable-index-page +//@ aux-build:all-item-types.rs +//@ build-aux-docs +//@ compile-flags: -Z unstable-options --enable-index-page #![crate_name = "foo"] diff --git a/tests/rustdoc/inline-assoc-type-20727-bindings.rs b/tests/rustdoc/inline-assoc-type-20727-bindings.rs index e59dec29d030..d270ccfc3755 100644 --- a/tests/rustdoc/inline-assoc-type-20727-bindings.rs +++ b/tests/rustdoc/inline-assoc-type-20727-bindings.rs @@ -1,5 +1,5 @@ -// aux-build:issue-20727.rs -// ignore-cross-compile +//@ aux-build:issue-20727.rs +//@ ignore-cross-compile // https://github.com/rust-lang/rust/issues/20727 #![crate_name="issue_20727_2"] diff --git a/tests/rustdoc/inline-assoc-type-20727-bounds-deref.rs b/tests/rustdoc/inline-assoc-type-20727-bounds-deref.rs index 005ee3e32941..b8449860531e 100644 --- a/tests/rustdoc/inline-assoc-type-20727-bounds-deref.rs +++ b/tests/rustdoc/inline-assoc-type-20727-bounds-deref.rs @@ -1,5 +1,5 @@ -// aux-build:issue-20727.rs -// ignore-cross-compile +//@ aux-build:issue-20727.rs +//@ ignore-cross-compile // https://github.com/rust-lang/rust/issues/20727 #![crate_name="issue_20727_3"] diff --git a/tests/rustdoc/inline-assoc-type-20727-bounds-index.rs b/tests/rustdoc/inline-assoc-type-20727-bounds-index.rs index 1a3f4cd20c1e..4905d0dc4c5f 100644 --- a/tests/rustdoc/inline-assoc-type-20727-bounds-index.rs +++ b/tests/rustdoc/inline-assoc-type-20727-bounds-index.rs @@ -1,5 +1,5 @@ -// aux-build:issue-20727.rs -// ignore-cross-compile +//@ aux-build:issue-20727.rs +//@ ignore-cross-compile // https://github.com/rust-lang/rust/issues/20727 #![crate_name="issue_20727_4"] diff --git a/tests/rustdoc/inline-assoc-type-20727-bounds.rs b/tests/rustdoc/inline-assoc-type-20727-bounds.rs index 7cbc8d38107d..e6e0490cdd89 100644 --- a/tests/rustdoc/inline-assoc-type-20727-bounds.rs +++ b/tests/rustdoc/inline-assoc-type-20727-bounds.rs @@ -1,5 +1,5 @@ -// aux-build:issue-20727.rs -// ignore-cross-compile +//@ aux-build:issue-20727.rs +//@ ignore-cross-compile // https://github.com/rust-lang/rust/issues/20727 #![crate_name="issue_20727"] diff --git a/tests/rustdoc/inline-default-methods.rs b/tests/rustdoc/inline-default-methods.rs index 7706cb139ac9..a37795673763 100644 --- a/tests/rustdoc/inline-default-methods.rs +++ b/tests/rustdoc/inline-default-methods.rs @@ -1,5 +1,5 @@ -// aux-build:inline-default-methods.rs -// ignore-cross-compile +//@ aux-build:inline-default-methods.rs +//@ ignore-cross-compile extern crate inline_default_methods; diff --git a/tests/rustdoc/inline_cross/add-docs.rs b/tests/rustdoc/inline_cross/add-docs.rs index a1124d2094c0..a7fbe3c6d0e4 100644 --- a/tests/rustdoc/inline_cross/add-docs.rs +++ b/tests/rustdoc/inline_cross/add-docs.rs @@ -1,4 +1,4 @@ -// aux-build:add-docs.rs +//@ aux-build:add-docs.rs extern crate inner; diff --git a/tests/rustdoc/inline_cross/assoc-const-equality.rs b/tests/rustdoc/inline_cross/assoc-const-equality.rs index 1d3ce9e3172f..89ed808de620 100644 --- a/tests/rustdoc/inline_cross/assoc-const-equality.rs +++ b/tests/rustdoc/inline_cross/assoc-const-equality.rs @@ -1,5 +1,5 @@ -// aux-crate:assoc_const_equality=assoc-const-equality.rs -// edition:2021 +//@ aux-crate:assoc_const_equality=assoc-const-equality.rs +//@ edition:2021 #![crate_name = "user"] diff --git a/tests/rustdoc/inline_cross/assoc-items.rs b/tests/rustdoc/inline_cross/assoc-items.rs index 811827a17fee..6b126964a783 100644 --- a/tests/rustdoc/inline_cross/assoc-items.rs +++ b/tests/rustdoc/inline_cross/assoc-items.rs @@ -1,6 +1,6 @@ -// aux-build:assoc-items.rs -// build-aux-docs -// ignore-cross-compile +//@ aux-build:assoc-items.rs +//@ build-aux-docs +//@ ignore-cross-compile #![crate_name = "foo"] diff --git a/tests/rustdoc/inline_cross/assoc_item_trait_bounds.rs b/tests/rustdoc/inline_cross/assoc_item_trait_bounds.rs index 74ceb697af69..c030e3449977 100644 --- a/tests/rustdoc/inline_cross/assoc_item_trait_bounds.rs +++ b/tests/rustdoc/inline_cross/assoc_item_trait_bounds.rs @@ -1,9 +1,9 @@ // Regression test for issues #77763, #84579 and #102142. #![crate_name = "main"] -// aux-build:assoc_item_trait_bounds.rs -// build-aux-docs -// ignore-cross-compile +//@ aux-build:assoc_item_trait_bounds.rs +//@ build-aux-docs +//@ ignore-cross-compile extern crate assoc_item_trait_bounds as aux; // @has main/trait.Main.html diff --git a/tests/rustdoc/inline_cross/async-fn.rs b/tests/rustdoc/inline_cross/async-fn.rs index 95e175aabd07..20fa409a8ddd 100644 --- a/tests/rustdoc/inline_cross/async-fn.rs +++ b/tests/rustdoc/inline_cross/async-fn.rs @@ -2,8 +2,8 @@ // Check that we render the correct return type of free and // associated async functions reexported from external crates. -// aux-crate:async_fn=async-fn.rs -// edition: 2021 +//@ aux-crate:async_fn=async-fn.rs +//@ edition: 2021 #![crate_name = "user"] // @has user/fn.load.html diff --git a/tests/rustdoc/inline_cross/attributes.rs b/tests/rustdoc/inline_cross/attributes.rs index c0b75c48fee9..ac9e6174dc1c 100644 --- a/tests/rustdoc/inline_cross/attributes.rs +++ b/tests/rustdoc/inline_cross/attributes.rs @@ -1,5 +1,5 @@ -// aux-crate:attributes=attributes.rs -// edition:2021 +//@ aux-crate:attributes=attributes.rs +//@ edition:2021 #![crate_name = "user"] // @has 'user/struct.NonExhaustive.html' diff --git a/tests/rustdoc/inline_cross/auxiliary/async-fn.rs b/tests/rustdoc/inline_cross/auxiliary/async-fn.rs index 564ca7d671e2..1a1a5f44af90 100644 --- a/tests/rustdoc/inline_cross/auxiliary/async-fn.rs +++ b/tests/rustdoc/inline_cross/auxiliary/async-fn.rs @@ -1,4 +1,4 @@ -// edition: 2021 +//@ edition: 2021 pub async fn load() -> i32 { 0 diff --git a/tests/rustdoc/inline_cross/auxiliary/impl_trait_aux.rs b/tests/rustdoc/inline_cross/auxiliary/impl_trait_aux.rs index fa61312ebc87..d4ee96113292 100644 --- a/tests/rustdoc/inline_cross/auxiliary/impl_trait_aux.rs +++ b/tests/rustdoc/inline_cross/auxiliary/impl_trait_aux.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 use std::ops::Deref; diff --git a/tests/rustdoc/inline_cross/auxiliary/issue-21801.rs b/tests/rustdoc/inline_cross/auxiliary/issue-21801.rs index 732612ff0007..51842de12d97 100644 --- a/tests/rustdoc/inline_cross/auxiliary/issue-21801.rs +++ b/tests/rustdoc/inline_cross/auxiliary/issue-21801.rs @@ -1,4 +1,4 @@ -// compile-flags: -Cmetadata=aux +//@ compile-flags: -Cmetadata=aux pub struct Foo; diff --git a/tests/rustdoc/inline_cross/auxiliary/issue-27362-aux.rs b/tests/rustdoc/inline_cross/auxiliary/issue-27362-aux.rs index 077bdc33e66f..29487715df87 100644 --- a/tests/rustdoc/inline_cross/auxiliary/issue-27362-aux.rs +++ b/tests/rustdoc/inline_cross/auxiliary/issue-27362-aux.rs @@ -1,4 +1,4 @@ -// compile-flags: -Cmetadata=aux +//@ compile-flags: -Cmetadata=aux pub const fn foo() {} pub const unsafe fn bar() {} diff --git a/tests/rustdoc/inline_cross/auxiliary/issue-29584.rs b/tests/rustdoc/inline_cross/auxiliary/issue-29584.rs index a9b8796c0fe3..03e26bcf4bf7 100644 --- a/tests/rustdoc/inline_cross/auxiliary/issue-29584.rs +++ b/tests/rustdoc/inline_cross/auxiliary/issue-29584.rs @@ -1,4 +1,4 @@ -// compile-flags: -Cmetadata=aux +//@ compile-flags: -Cmetadata=aux pub struct Foo; diff --git a/tests/rustdoc/inline_cross/auxiliary/issue-46727.rs b/tests/rustdoc/inline_cross/auxiliary/issue-46727.rs index 30dccfa77b5a..acfc418f9f1d 100644 --- a/tests/rustdoc/inline_cross/auxiliary/issue-46727.rs +++ b/tests/rustdoc/inline_cross/auxiliary/issue-46727.rs @@ -1,4 +1,4 @@ -// compile-flags: -Cmetadata=aux +//@ compile-flags: -Cmetadata=aux pub trait Foo {} diff --git a/tests/rustdoc/inline_cross/auxiliary/proc_macro.rs b/tests/rustdoc/inline_cross/auxiliary/proc_macro.rs index d8e5746f3f6f..4cb66580e250 100644 --- a/tests/rustdoc/inline_cross/auxiliary/proc_macro.rs +++ b/tests/rustdoc/inline_cross/auxiliary/proc_macro.rs @@ -1,6 +1,6 @@ -// force-host -// no-prefer-dynamic -// compile-flags: --crate-type proc-macro +//@ force-host +//@ no-prefer-dynamic +//@ compile-flags: --crate-type proc-macro #![crate_type="proc-macro"] #![crate_name="some_macros"] diff --git a/tests/rustdoc/inline_cross/const-effect-param.rs b/tests/rustdoc/inline_cross/const-effect-param.rs index 1d003e28f36d..72c90ab69684 100644 --- a/tests/rustdoc/inline_cross/const-effect-param.rs +++ b/tests/rustdoc/inline_cross/const-effect-param.rs @@ -1,8 +1,8 @@ // Regression test for issue #116629. // Check that we don't render host effect parameters & arguments. -// aux-crate:const_effect_param=const-effect-param.rs -// edition: 2021 +//@ aux-crate:const_effect_param=const-effect-param.rs +//@ edition: 2021 #![crate_name = "user"] // Don't render the host param on `load` and the host arg `host` passed to `Resource`. diff --git a/tests/rustdoc/inline_cross/const-eval-46727.rs b/tests/rustdoc/inline_cross/const-eval-46727.rs index d0ce9c34f51b..213664a90b93 100644 --- a/tests/rustdoc/inline_cross/const-eval-46727.rs +++ b/tests/rustdoc/inline_cross/const-eval-46727.rs @@ -1,7 +1,7 @@ // https://github.com/rust-lang/rust/issues/46727 #![crate_name="foo"] -// aux-build:issue-46727.rs +//@ aux-build:issue-46727.rs extern crate issue_46727; diff --git a/tests/rustdoc/inline_cross/const-fn-27362.rs b/tests/rustdoc/inline_cross/const-fn-27362.rs index 39b904662e06..22b2fa30fecf 100644 --- a/tests/rustdoc/inline_cross/const-fn-27362.rs +++ b/tests/rustdoc/inline_cross/const-fn-27362.rs @@ -1,5 +1,5 @@ -// aux-build:issue-27362-aux.rs -// ignore-cross-compile +//@ aux-build:issue-27362-aux.rs +//@ ignore-cross-compile // https://github.com/rust-lang/rust/issues/27362 #![crate_name="issue_27362"] diff --git a/tests/rustdoc/inline_cross/cross-glob.rs b/tests/rustdoc/inline_cross/cross-glob.rs index 7a519d2d2554..ae36655936c1 100644 --- a/tests/rustdoc/inline_cross/cross-glob.rs +++ b/tests/rustdoc/inline_cross/cross-glob.rs @@ -1,6 +1,6 @@ -// aux-build:cross-glob.rs -// build-aux-docs -// ignore-cross-compile +//@ aux-build:cross-glob.rs +//@ build-aux-docs +//@ ignore-cross-compile extern crate inner; diff --git a/tests/rustdoc/inline_cross/deduplicate-inlined-items-23207.rs b/tests/rustdoc/inline_cross/deduplicate-inlined-items-23207.rs index 4e9596db589e..374b4d28545d 100644 --- a/tests/rustdoc/inline_cross/deduplicate-inlined-items-23207.rs +++ b/tests/rustdoc/inline_cross/deduplicate-inlined-items-23207.rs @@ -1,6 +1,6 @@ -// aux-build:issue-23207-1.rs -// aux-build:issue-23207-2.rs -// ignore-cross-compile +//@ aux-build:issue-23207-1.rs +//@ aux-build:issue-23207-2.rs +//@ ignore-cross-compile // https://github.com/rust-lang/rust/issues/23207 #![crate_name="issue_23207"] diff --git a/tests/rustdoc/inline_cross/default-generic-args.rs b/tests/rustdoc/inline_cross/default-generic-args.rs index 775bf0415328..f006915f153d 100644 --- a/tests/rustdoc/inline_cross/default-generic-args.rs +++ b/tests/rustdoc/inline_cross/default-generic-args.rs @@ -1,6 +1,6 @@ #![crate_name = "user"] -// aux-crate:default_generic_args=default-generic-args.rs -// edition:2021 +//@ aux-crate:default_generic_args=default-generic-args.rs +//@ edition:2021 // @has user/type.BoxedStr.html // @has - '//*[@class="rust item-decl"]//code' "Box" diff --git a/tests/rustdoc/inline_cross/default-trait-method.rs b/tests/rustdoc/inline_cross/default-trait-method.rs index a4ec73a127d4..3d9437350312 100644 --- a/tests/rustdoc/inline_cross/default-trait-method.rs +++ b/tests/rustdoc/inline_cross/default-trait-method.rs @@ -1,4 +1,4 @@ -// aux-build:default-trait-method.rs +//@ aux-build:default-trait-method.rs extern crate foo; diff --git a/tests/rustdoc/inline_cross/doc-hidden-extern-trait-impl-29584.rs b/tests/rustdoc/inline_cross/doc-hidden-extern-trait-impl-29584.rs index b246e94e048d..4643e8f47506 100644 --- a/tests/rustdoc/inline_cross/doc-hidden-extern-trait-impl-29584.rs +++ b/tests/rustdoc/inline_cross/doc-hidden-extern-trait-impl-29584.rs @@ -1,5 +1,5 @@ -// aux-build:issue-29584.rs -// ignore-cross-compile +//@ aux-build:issue-29584.rs +//@ ignore-cross-compile // https://github.com/rust-lang/rust/issues/29584 #![crate_name="issue_29584"] diff --git a/tests/rustdoc/inline_cross/dyn_trait.rs b/tests/rustdoc/inline_cross/dyn_trait.rs index 9871be79ca36..18404556984c 100644 --- a/tests/rustdoc/inline_cross/dyn_trait.rs +++ b/tests/rustdoc/inline_cross/dyn_trait.rs @@ -3,8 +3,8 @@ // In each test case, we include the trailing semicolon to ensure that nothing extra comes // after the type like an unwanted outlives-bound. -// aux-crate:dyn_trait=dyn_trait.rs -// edition:2021 +//@ aux-crate:dyn_trait=dyn_trait.rs +//@ edition:2021 // @has user/type.Ty0.html // @has - '//*[@class="rust item-decl"]//code' "dyn for<'any> FnOnce(&'any str) -> bool;" diff --git a/tests/rustdoc/inline_cross/early-late-bound-lifetime-params.rs b/tests/rustdoc/inline_cross/early-late-bound-lifetime-params.rs index 09cc8a79072b..97dd623bb078 100644 --- a/tests/rustdoc/inline_cross/early-late-bound-lifetime-params.rs +++ b/tests/rustdoc/inline_cross/early-late-bound-lifetime-params.rs @@ -5,8 +5,8 @@ // separately in rustc and therefore rustdoc needs to manually merge them. #![crate_name = "usr"] -// aux-crate:dep=early-late-bound-lifetime-params.rs -// edition:2021 +//@ aux-crate:dep=early-late-bound-lifetime-params.rs +//@ edition:2021 // @has usr/fn.f.html // @has - '//pre[@class="rust item-decl"]' "fn f<'a, 'b, 'c, 'd, T, const N: usize>(_: impl Copy)" diff --git a/tests/rustdoc/inline_cross/fn-type.rs b/tests/rustdoc/inline_cross/fn-type.rs index e65790d3b05a..222557a4663b 100644 --- a/tests/rustdoc/inline_cross/fn-type.rs +++ b/tests/rustdoc/inline_cross/fn-type.rs @@ -2,8 +2,8 @@ // They should be rendered exactly as the user wrote it, i.e., in source order and with unused // parameters present, not stripped. -// aux-crate:fn_type=fn-type.rs -// edition: 2021 +//@ aux-crate:fn_type=fn-type.rs +//@ edition: 2021 #![crate_name = "user"] // @has user/type.F.html diff --git a/tests/rustdoc/inline_cross/generic-const-items.rs b/tests/rustdoc/inline_cross/generic-const-items.rs index 70cf7af888ee..77011a05d2f5 100644 --- a/tests/rustdoc/inline_cross/generic-const-items.rs +++ b/tests/rustdoc/inline_cross/generic-const-items.rs @@ -1,7 +1,7 @@ #![crate_name = "user"] -// aux-crate:generic_const_items=generic-const-items.rs -// edition:2021 +//@ aux-crate:generic_const_items=generic-const-items.rs +//@ edition:2021 // @has 'user/constant.K.html' // @has - '//*[@class="rust item-decl"]//code' \ diff --git a/tests/rustdoc/inline_cross/hidden-use.rs b/tests/rustdoc/inline_cross/hidden-use.rs index 28a4f4bac1a4..f747c94915ce 100644 --- a/tests/rustdoc/inline_cross/hidden-use.rs +++ b/tests/rustdoc/inline_cross/hidden-use.rs @@ -1,6 +1,6 @@ -// aux-build:rustdoc-hidden.rs -// build-aux-docs -// ignore-cross-compile +//@ aux-build:rustdoc-hidden.rs +//@ build-aux-docs +//@ ignore-cross-compile extern crate rustdoc_hidden; diff --git a/tests/rustdoc/inline_cross/impl-inline-without-trait.rs b/tests/rustdoc/inline_cross/impl-inline-without-trait.rs index 9b67022fd4bb..60265b5df8fb 100644 --- a/tests/rustdoc/inline_cross/impl-inline-without-trait.rs +++ b/tests/rustdoc/inline_cross/impl-inline-without-trait.rs @@ -1,6 +1,6 @@ -// aux-build:impl-inline-without-trait.rs -// build-aux-docs -// ignore-cross-compile +//@ aux-build:impl-inline-without-trait.rs +//@ build-aux-docs +//@ ignore-cross-compile #![crate_name = "foo"] diff --git a/tests/rustdoc/inline_cross/impl-sized.rs b/tests/rustdoc/inline_cross/impl-sized.rs index 82bdce474784..b62a1e61e2bb 100644 --- a/tests/rustdoc/inline_cross/impl-sized.rs +++ b/tests/rustdoc/inline_cross/impl-sized.rs @@ -1,7 +1,7 @@ #![crate_name = "user"] -// aux-crate:impl_sized=impl-sized.rs -// edition:2021 +//@ aux-crate:impl_sized=impl-sized.rs +//@ edition:2021 // @has user/fn.sized.html // @has - '//pre[@class="rust item-decl"]' "sized(x: impl Sized) -> impl Sized" diff --git a/tests/rustdoc/inline_cross/impl_trait.rs b/tests/rustdoc/inline_cross/impl_trait.rs index 3a2f5d160045..47e2c9dc76bc 100644 --- a/tests/rustdoc/inline_cross/impl_trait.rs +++ b/tests/rustdoc/inline_cross/impl_trait.rs @@ -1,5 +1,5 @@ -// aux-build:impl_trait_aux.rs -// edition:2018 +//@ aux-build:impl_trait_aux.rs +//@ edition:2018 extern crate impl_trait_aux; diff --git a/tests/rustdoc/inline_cross/implementors-js.rs b/tests/rustdoc/inline_cross/implementors-js.rs index c17d52d0f414..099da54093c0 100644 --- a/tests/rustdoc/inline_cross/implementors-js.rs +++ b/tests/rustdoc/inline_cross/implementors-js.rs @@ -1,6 +1,6 @@ -// aux-build:implementors_inline.rs -// build-aux-docs -// ignore-cross-compile +//@ aux-build:implementors_inline.rs +//@ build-aux-docs +//@ ignore-cross-compile extern crate implementors_inline; diff --git a/tests/rustdoc/inline_cross/inline_hidden.rs b/tests/rustdoc/inline_cross/inline_hidden.rs index dcceaadb9680..ec06f2f0c5d6 100644 --- a/tests/rustdoc/inline_cross/inline_hidden.rs +++ b/tests/rustdoc/inline_cross/inline_hidden.rs @@ -1,6 +1,6 @@ -// aux-build:rustdoc-hidden.rs -// build-aux-docs -// ignore-cross-compile +//@ aux-build:rustdoc-hidden.rs +//@ build-aux-docs +//@ ignore-cross-compile extern crate rustdoc_hidden; diff --git a/tests/rustdoc/inline_cross/issue-24183.rs b/tests/rustdoc/inline_cross/issue-24183.rs index 751a32385e81..cd39cda718b7 100644 --- a/tests/rustdoc/inline_cross/issue-24183.rs +++ b/tests/rustdoc/inline_cross/issue-24183.rs @@ -1,8 +1,8 @@ #![crate_type = "lib"] #![crate_name = "usr"] -// aux-crate:issue_24183=issue-24183.rs -// edition: 2021 +//@ aux-crate:issue_24183=issue-24183.rs +//@ edition: 2021 // @has usr/trait.U.html // @has - '//*[@class="rust item-decl"]' "pub trait U {" diff --git a/tests/rustdoc/inline_cross/issue-28480.rs b/tests/rustdoc/inline_cross/issue-28480.rs index 99f5b9007714..9d221a46d920 100644 --- a/tests/rustdoc/inline_cross/issue-28480.rs +++ b/tests/rustdoc/inline_cross/issue-28480.rs @@ -1,6 +1,6 @@ -// aux-build:rustdoc-hidden-sig.rs -// build-aux-docs -// ignore-cross-compile +//@ aux-build:rustdoc-hidden-sig.rs +//@ build-aux-docs +//@ ignore-cross-compile // @has rustdoc_hidden_sig/struct.Bar.html // @!has - '//a/@title' 'Hidden' diff --git a/tests/rustdoc/inline_cross/issue-31948-1.rs b/tests/rustdoc/inline_cross/issue-31948-1.rs index 571eaf6be967..ee053f40638a 100644 --- a/tests/rustdoc/inline_cross/issue-31948-1.rs +++ b/tests/rustdoc/inline_cross/issue-31948-1.rs @@ -1,6 +1,6 @@ -// aux-build:rustdoc-nonreachable-impls.rs -// build-aux-docs -// ignore-cross-compile +//@ aux-build:rustdoc-nonreachable-impls.rs +//@ build-aux-docs +//@ ignore-cross-compile extern crate rustdoc_nonreachable_impls; diff --git a/tests/rustdoc/inline_cross/issue-31948-2.rs b/tests/rustdoc/inline_cross/issue-31948-2.rs index 7eae21046ccb..5019f0369b78 100644 --- a/tests/rustdoc/inline_cross/issue-31948-2.rs +++ b/tests/rustdoc/inline_cross/issue-31948-2.rs @@ -1,6 +1,6 @@ -// aux-build:rustdoc-nonreachable-impls.rs -// build-aux-docs -// ignore-cross-compile +//@ aux-build:rustdoc-nonreachable-impls.rs +//@ build-aux-docs +//@ ignore-cross-compile extern crate rustdoc_nonreachable_impls; diff --git a/tests/rustdoc/inline_cross/issue-31948.rs b/tests/rustdoc/inline_cross/issue-31948.rs index 9c271bf4ad43..eaed8509520f 100644 --- a/tests/rustdoc/inline_cross/issue-31948.rs +++ b/tests/rustdoc/inline_cross/issue-31948.rs @@ -1,6 +1,6 @@ -// aux-build:rustdoc-nonreachable-impls.rs -// build-aux-docs -// ignore-cross-compile +//@ aux-build:rustdoc-nonreachable-impls.rs +//@ build-aux-docs +//@ ignore-cross-compile extern crate rustdoc_nonreachable_impls; diff --git a/tests/rustdoc/inline_cross/issue-32881.rs b/tests/rustdoc/inline_cross/issue-32881.rs index 183fd15abbe1..93e868b466a0 100644 --- a/tests/rustdoc/inline_cross/issue-32881.rs +++ b/tests/rustdoc/inline_cross/issue-32881.rs @@ -1,6 +1,6 @@ -// aux-build:rustdoc-trait-object-impl.rs -// build-aux-docs -// ignore-cross-compile +//@ aux-build:rustdoc-trait-object-impl.rs +//@ build-aux-docs +//@ ignore-cross-compile extern crate rustdoc_trait_object_impl; diff --git a/tests/rustdoc/inline_cross/issue-33113.rs b/tests/rustdoc/inline_cross/issue-33113.rs index d954707facfe..807bbcbe9b86 100644 --- a/tests/rustdoc/inline_cross/issue-33113.rs +++ b/tests/rustdoc/inline_cross/issue-33113.rs @@ -1,6 +1,6 @@ -// aux-build:issue-33113.rs -// build-aux-docs -// ignore-cross-compile +//@ aux-build:issue-33113.rs +//@ build-aux-docs +//@ ignore-cross-compile extern crate bar; diff --git a/tests/rustdoc/inline_cross/issue-76736-1.rs b/tests/rustdoc/inline_cross/issue-76736-1.rs index 25feae2c8d68..692677a3eee6 100644 --- a/tests/rustdoc/inline_cross/issue-76736-1.rs +++ b/tests/rustdoc/inline_cross/issue-76736-1.rs @@ -1,5 +1,5 @@ -// aux-build:issue-76736-1.rs -// aux-build:issue-76736-2.rs +//@ aux-build:issue-76736-1.rs +//@ aux-build:issue-76736-2.rs #![crate_name = "foo"] diff --git a/tests/rustdoc/inline_cross/issue-76736-2.rs b/tests/rustdoc/inline_cross/issue-76736-2.rs index e43c825d6e14..83529dd1887c 100644 --- a/tests/rustdoc/inline_cross/issue-76736-2.rs +++ b/tests/rustdoc/inline_cross/issue-76736-2.rs @@ -1,5 +1,5 @@ -// aux-build:issue-76736-1.rs -// aux-build:issue-76736-2.rs +//@ aux-build:issue-76736-1.rs +//@ aux-build:issue-76736-2.rs #![crate_name = "foo"] #![feature(rustc_private)] diff --git a/tests/rustdoc/inline_cross/issue-76736-3.rs b/tests/rustdoc/inline_cross/issue-76736-3.rs index 9542f3f3557a..cf75c8d0321b 100644 --- a/tests/rustdoc/inline_cross/issue-76736-3.rs +++ b/tests/rustdoc/inline_cross/issue-76736-3.rs @@ -1,6 +1,6 @@ -// compile-flags: -Zforce-unstable-if-unmarked -// aux-build:issue-76736-1.rs -// aux-build:issue-76736-2.rs +//@ compile-flags: -Zforce-unstable-if-unmarked +//@ aux-build:issue-76736-1.rs +//@ aux-build:issue-76736-2.rs #![crate_name = "foo"] diff --git a/tests/rustdoc/inline_cross/macro-vis.rs b/tests/rustdoc/inline_cross/macro-vis.rs index 9fefd38ad2c1..6b811f1452a0 100644 --- a/tests/rustdoc/inline_cross/macro-vis.rs +++ b/tests/rustdoc/inline_cross/macro-vis.rs @@ -1,6 +1,6 @@ -// aux-build:macro-vis.rs -// build-aux-docs -// ignore-cross-compile +//@ aux-build:macro-vis.rs +//@ build-aux-docs +//@ ignore-cross-compile #[macro_use] extern crate qwop; diff --git a/tests/rustdoc/inline_cross/macros.rs b/tests/rustdoc/inline_cross/macros.rs index a41b9c5b1972..c711216d2b55 100644 --- a/tests/rustdoc/inline_cross/macros.rs +++ b/tests/rustdoc/inline_cross/macros.rs @@ -1,5 +1,5 @@ -// aux-build:macros.rs -// build-aux-docs +//@ aux-build:macros.rs +//@ build-aux-docs #![feature(macro_test)] #![crate_name = "foo"] diff --git a/tests/rustdoc/inline_cross/non_lifetime_binders.rs b/tests/rustdoc/inline_cross/non_lifetime_binders.rs index 9d3085c3ef26..edc48c88d9cb 100644 --- a/tests/rustdoc/inline_cross/non_lifetime_binders.rs +++ b/tests/rustdoc/inline_cross/non_lifetime_binders.rs @@ -1,5 +1,5 @@ -// aux-crate:non_lifetime_binders=non_lifetime_binders.rs -// edition: 2021 +//@ aux-crate:non_lifetime_binders=non_lifetime_binders.rs +//@ edition: 2021 #![crate_name = "user"] // @has user/fn.f.html diff --git a/tests/rustdoc/inline_cross/proc_macro.rs b/tests/rustdoc/inline_cross/proc_macro.rs index a46550865c8b..4d3b0d554ab4 100644 --- a/tests/rustdoc/inline_cross/proc_macro.rs +++ b/tests/rustdoc/inline_cross/proc_macro.rs @@ -1,5 +1,5 @@ -// aux-build:proc_macro.rs -// build-aux-docs +//@ aux-build:proc_macro.rs +//@ build-aux-docs extern crate some_macros; diff --git a/tests/rustdoc/inline_cross/renamed-via-module.rs b/tests/rustdoc/inline_cross/renamed-via-module.rs index cdedbf070798..1f6a9cff8cef 100644 --- a/tests/rustdoc/inline_cross/renamed-via-module.rs +++ b/tests/rustdoc/inline_cross/renamed-via-module.rs @@ -1,6 +1,6 @@ -// aux-build:renamed-via-module.rs -// build-aux-docs -// ignore-cross-compile +//@ aux-build:renamed-via-module.rs +//@ build-aux-docs +//@ ignore-cross-compile #![crate_name = "bar"] diff --git a/tests/rustdoc/inline_cross/repr.rs b/tests/rustdoc/inline_cross/repr.rs index 2f3d8f003884..1d63bd1d7cb4 100644 --- a/tests/rustdoc/inline_cross/repr.rs +++ b/tests/rustdoc/inline_cross/repr.rs @@ -1,7 +1,7 @@ // Regression test for . // This test ensures that the re-exported items still have the `#[repr(...)]` attribute. -// aux-build:repr.rs +//@ aux-build:repr.rs #![crate_name = "foo"] diff --git a/tests/rustdoc/inline_cross/ret-pos-impl-trait-in-trait.rs b/tests/rustdoc/inline_cross/ret-pos-impl-trait-in-trait.rs index 8e9ef9020153..1292e7c74ed7 100644 --- a/tests/rustdoc/inline_cross/ret-pos-impl-trait-in-trait.rs +++ b/tests/rustdoc/inline_cross/ret-pos-impl-trait-in-trait.rs @@ -1,6 +1,6 @@ #![crate_name = "user"] -// aux-crate:rpitit=ret-pos-impl-trait-in-trait.rs -// edition:2021 +//@ aux-crate:rpitit=ret-pos-impl-trait-in-trait.rs +//@ edition:2021 // Test that we can correctly render cross-crate RPITITs. // In particular, check that we don't render the internal associated type generated by diff --git a/tests/rustdoc/inline_cross/sugar-closure-crate-21801.rs b/tests/rustdoc/inline_cross/sugar-closure-crate-21801.rs index bcbb2e9f4088..a00dcaf409bd 100644 --- a/tests/rustdoc/inline_cross/sugar-closure-crate-21801.rs +++ b/tests/rustdoc/inline_cross/sugar-closure-crate-21801.rs @@ -1,5 +1,5 @@ -// aux-build:issue-21801.rs -// ignore-cross-compile +//@ aux-build:issue-21801.rs +//@ ignore-cross-compile // https://github.com/rust-lang/rust/issues/21801 #![crate_name="issue_21801"] diff --git a/tests/rustdoc/inline_cross/trait-vis.rs b/tests/rustdoc/inline_cross/trait-vis.rs index b646babacc5c..fc992ab3110a 100644 --- a/tests/rustdoc/inline_cross/trait-vis.rs +++ b/tests/rustdoc/inline_cross/trait-vis.rs @@ -1,4 +1,4 @@ -// aux-build:trait-vis.rs +//@ aux-build:trait-vis.rs extern crate inner; diff --git a/tests/rustdoc/inline_cross/use_crate.rs b/tests/rustdoc/inline_cross/use_crate.rs index 00e0f041c56f..38cbcfa6b847 100644 --- a/tests/rustdoc/inline_cross/use_crate.rs +++ b/tests/rustdoc/inline_cross/use_crate.rs @@ -1,8 +1,8 @@ -// aux-build:use_crate.rs -// aux-build:use_crate_2.rs -// build-aux-docs -// edition:2018 -// compile-flags:--extern use_crate --extern use_crate_2 +//@ aux-build:use_crate.rs +//@ aux-build:use_crate_2.rs +//@ build-aux-docs +//@ edition:2018 +//@ compile-flags:--extern use_crate --extern use_crate_2 // During the buildup to Rust 2018, rustdoc would eagerly inline `pub use some_crate;` as if it // were a module, so we changed it to make `pub use`ing crate roots remain as a `pub use` statement diff --git a/tests/rustdoc/inline_local/glob-extern-document-private-items.rs b/tests/rustdoc/inline_local/glob-extern-document-private-items.rs index 8e1089d60ec5..9a11f88c81a2 100644 --- a/tests/rustdoc/inline_local/glob-extern-document-private-items.rs +++ b/tests/rustdoc/inline_local/glob-extern-document-private-items.rs @@ -1,4 +1,4 @@ -// compile-flags: --document-private-items +//@ compile-flags: --document-private-items #![crate_name = "foo"] diff --git a/tests/rustdoc/inline_local/glob-private-document-private-items.rs b/tests/rustdoc/inline_local/glob-private-document-private-items.rs index d8cbd42343b9..4ad217d22705 100644 --- a/tests/rustdoc/inline_local/glob-private-document-private-items.rs +++ b/tests/rustdoc/inline_local/glob-private-document-private-items.rs @@ -1,4 +1,4 @@ -// compile-flags: --document-private-items +//@ compile-flags: --document-private-items #![crate_name = "foo"] diff --git a/tests/rustdoc/internal.rs b/tests/rustdoc/internal.rs index 27b0897689e0..4663965f621a 100644 --- a/tests/rustdoc/internal.rs +++ b/tests/rustdoc/internal.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z force-unstable-if-unmarked +//@ compile-flags: -Z force-unstable-if-unmarked // Check that the unstable marker is not added for "rustc_private". diff --git a/tests/rustdoc/intra-doc-crate/self.rs b/tests/rustdoc/intra-doc-crate/self.rs index 8c36a7fa002d..015611610acf 100644 --- a/tests/rustdoc/intra-doc-crate/self.rs +++ b/tests/rustdoc/intra-doc-crate/self.rs @@ -1,5 +1,5 @@ -// aux-build:self.rs -// build-aux-docs +//@ aux-build:self.rs +//@ build-aux-docs extern crate cross_crate_self; diff --git a/tests/rustdoc/intra-doc/auxiliary/extern-builtin-type-impl-dep.rs b/tests/rustdoc/intra-doc/auxiliary/extern-builtin-type-impl-dep.rs index d9a08cb41b82..f0662fd82f19 100644 --- a/tests/rustdoc/intra-doc/auxiliary/extern-builtin-type-impl-dep.rs +++ b/tests/rustdoc/intra-doc/auxiliary/extern-builtin-type-impl-dep.rs @@ -1,4 +1,4 @@ -// no-prefer-dynamic +//@ no-prefer-dynamic #![feature(lang_items, rustc_attrs)] #![crate_type = "rlib"] diff --git a/tests/rustdoc/intra-doc/auxiliary/proc-macro-macro.rs b/tests/rustdoc/intra-doc/auxiliary/proc-macro-macro.rs index 5ba132f25b47..b47e76a33e60 100644 --- a/tests/rustdoc/intra-doc/auxiliary/proc-macro-macro.rs +++ b/tests/rustdoc/intra-doc/auxiliary/proc-macro-macro.rs @@ -1,6 +1,6 @@ -// force-host -// no-prefer-dynamic -// compile-flags: --crate-type proc-macro +//@ force-host +//@ no-prefer-dynamic +//@ compile-flags: --crate-type proc-macro #![crate_type="proc-macro"] diff --git a/tests/rustdoc/intra-doc/cross-crate/additional_doc.rs b/tests/rustdoc/intra-doc/cross-crate/additional_doc.rs index e52fb9b1c9fd..dc928c64f6d6 100644 --- a/tests/rustdoc/intra-doc/cross-crate/additional_doc.rs +++ b/tests/rustdoc/intra-doc/cross-crate/additional_doc.rs @@ -1,5 +1,5 @@ -// aux-build:additional_doc.rs -// build-aux-docs +//@ aux-build:additional_doc.rs +//@ build-aux-docs #![deny(rustdoc::broken_intra_doc_links)] extern crate my_rand; diff --git a/tests/rustdoc/intra-doc/cross-crate/auxiliary/proc_macro.rs b/tests/rustdoc/intra-doc/cross-crate/auxiliary/proc_macro.rs index 0d5a954075df..107c44086b25 100644 --- a/tests/rustdoc/intra-doc/cross-crate/auxiliary/proc_macro.rs +++ b/tests/rustdoc/intra-doc/cross-crate/auxiliary/proc_macro.rs @@ -1,6 +1,6 @@ -// force-host -// no-prefer-dynamic -// compile-flags: --crate-type proc-macro +//@ force-host +//@ no-prefer-dynamic +//@ compile-flags: --crate-type proc-macro #![crate_type="proc-macro"] #![crate_name="proc_macro_inner"] diff --git a/tests/rustdoc/intra-doc/cross-crate/basic.rs b/tests/rustdoc/intra-doc/cross-crate/basic.rs index ad7454918b4e..f17c638b5789 100644 --- a/tests/rustdoc/intra-doc/cross-crate/basic.rs +++ b/tests/rustdoc/intra-doc/cross-crate/basic.rs @@ -1,5 +1,5 @@ -// aux-build:intra-doc-basic.rs -// build-aux-docs +//@ aux-build:intra-doc-basic.rs +//@ build-aux-docs #![deny(rustdoc::broken_intra_doc_links)] // from https://github.com/rust-lang/rust/issues/65983 diff --git a/tests/rustdoc/intra-doc/cross-crate/crate.rs b/tests/rustdoc/intra-doc/cross-crate/crate.rs index edf544708b62..34fff1f1f269 100644 --- a/tests/rustdoc/intra-doc/cross-crate/crate.rs +++ b/tests/rustdoc/intra-doc/cross-crate/crate.rs @@ -1,5 +1,5 @@ -// aux-build:intra-link-cross-crate-crate.rs -// build-aux-docs +//@ aux-build:intra-link-cross-crate-crate.rs +//@ build-aux-docs #![crate_name = "outer"] extern crate inner; // @has outer/fn.f.html '//a[@href="../inner/fn.g.html"]' "crate::g" diff --git a/tests/rustdoc/intra-doc/cross-crate/hidden.rs b/tests/rustdoc/intra-doc/cross-crate/hidden.rs index 4f7d075ba481..026c0fb4fdbc 100644 --- a/tests/rustdoc/intra-doc/cross-crate/hidden.rs +++ b/tests/rustdoc/intra-doc/cross-crate/hidden.rs @@ -1,5 +1,5 @@ -// aux-build:hidden.rs -// build-aux-docs +//@ aux-build:hidden.rs +//@ build-aux-docs #![deny(rustdoc::broken_intra_doc_links)] // tests https://github.com/rust-lang/rust/issues/73363 diff --git a/tests/rustdoc/intra-doc/cross-crate/macro.rs b/tests/rustdoc/intra-doc/cross-crate/macro.rs index 32f0a55d3c6e..cd8f1c3969f6 100644 --- a/tests/rustdoc/intra-doc/cross-crate/macro.rs +++ b/tests/rustdoc/intra-doc/cross-crate/macro.rs @@ -1,6 +1,6 @@ -// aux-build:macro_inner.rs -// aux-build:proc_macro.rs -// build-aux-docs +//@ aux-build:macro_inner.rs +//@ aux-build:proc_macro.rs +//@ build-aux-docs #![deny(rustdoc::broken_intra_doc_links)] extern crate macro_inner; extern crate proc_macro_inner; diff --git a/tests/rustdoc/intra-doc/cross-crate/module.rs b/tests/rustdoc/intra-doc/cross-crate/module.rs index fde9322657d1..2323cc94f8a3 100644 --- a/tests/rustdoc/intra-doc/cross-crate/module.rs +++ b/tests/rustdoc/intra-doc/cross-crate/module.rs @@ -1,6 +1,6 @@ // outer.rs -// aux-build: module.rs -// build-aux-docs +//@ aux-build: module.rs +//@ build-aux-docs #![deny(rustdoc::broken_intra_doc_links)] extern crate module_inner; // @has 'module/bar/index.html' '//a[@href="../../module_inner/trait.SomeTrait.html"]' 'SomeTrait' diff --git a/tests/rustdoc/intra-doc/cross-crate/submodule-inner.rs b/tests/rustdoc/intra-doc/cross-crate/submodule-inner.rs index 577fe78a5089..08996826561a 100644 --- a/tests/rustdoc/intra-doc/cross-crate/submodule-inner.rs +++ b/tests/rustdoc/intra-doc/cross-crate/submodule-inner.rs @@ -1,5 +1,5 @@ -// aux-build:submodule-inner.rs -// build-aux-docs +//@ aux-build:submodule-inner.rs +//@ build-aux-docs #![deny(rustdoc::broken_intra_doc_links)] extern crate a; diff --git a/tests/rustdoc/intra-doc/cross-crate/submodule-outer.rs b/tests/rustdoc/intra-doc/cross-crate/submodule-outer.rs index d0c0b7e85ae2..29b98036a96d 100644 --- a/tests/rustdoc/intra-doc/cross-crate/submodule-outer.rs +++ b/tests/rustdoc/intra-doc/cross-crate/submodule-outer.rs @@ -1,5 +1,5 @@ -// aux-build:submodule-outer.rs -// edition:2018 +//@ aux-build:submodule-outer.rs +//@ edition:2018 #![deny(rustdoc::broken_intra_doc_links)] extern crate bar as bar_; diff --git a/tests/rustdoc/intra-doc/cross-crate/traits.rs b/tests/rustdoc/intra-doc/cross-crate/traits.rs index 7b9554bfdb07..4b1625e5a51c 100644 --- a/tests/rustdoc/intra-doc/cross-crate/traits.rs +++ b/tests/rustdoc/intra-doc/cross-crate/traits.rs @@ -1,5 +1,5 @@ -// aux-build:traits.rs -// build-aux-docs +//@ aux-build:traits.rs +//@ build-aux-docs #![deny(rustdoc::broken_intra_doc_links)] extern crate inner; diff --git a/tests/rustdoc/intra-doc/extern-builtin-type-impl.rs b/tests/rustdoc/intra-doc/extern-builtin-type-impl.rs index 7bb1ded3f3c2..653b3b96892b 100644 --- a/tests/rustdoc/intra-doc/extern-builtin-type-impl.rs +++ b/tests/rustdoc/intra-doc/extern-builtin-type-impl.rs @@ -2,7 +2,7 @@ // comments. The doc link points to an associated item, so we check that traits in scope for that // link are populated. -// aux-build:extern-builtin-type-impl-dep.rs +//@ aux-build:extern-builtin-type-impl-dep.rs #![no_std] diff --git a/tests/rustdoc/intra-doc/extern-crate-only-used-in-link.rs b/tests/rustdoc/intra-doc/extern-crate-only-used-in-link.rs index ad50887e9221..cbe5bf912a57 100644 --- a/tests/rustdoc/intra-doc/extern-crate-only-used-in-link.rs +++ b/tests/rustdoc/intra-doc/extern-crate-only-used-in-link.rs @@ -1,12 +1,12 @@ // This test is just a little cursed. -// aux-build:issue-66159-1.rs -// aux-crate:priv:issue_66159_1=issue-66159-1.rs -// aux-build:empty.rs -// aux-crate:priv:empty=empty.rs -// aux-build:empty2.rs -// aux-crate:priv:empty2=empty2.rs -// build-aux-docs -// compile-flags:-Z unstable-options --edition 2018 +//@ aux-build:issue-66159-1.rs +//@ aux-crate:priv:issue_66159_1=issue-66159-1.rs +//@ aux-build:empty.rs +//@ aux-crate:priv:empty=empty.rs +//@ aux-build:empty2.rs +//@ aux-crate:priv:empty2=empty2.rs +//@ build-aux-docs +//@ compile-flags:-Z unstable-options --edition 2018 // @has extern_crate_only_used_in_link/index.html // @has - '//a[@href="../issue_66159_1/struct.Something.html"]' 'issue_66159_1::Something' diff --git a/tests/rustdoc/intra-doc/extern-crate.rs b/tests/rustdoc/intra-doc/extern-crate.rs index 4e4438dea038..3cfe37a8aca1 100644 --- a/tests/rustdoc/intra-doc/extern-crate.rs +++ b/tests/rustdoc/intra-doc/extern-crate.rs @@ -1,4 +1,4 @@ -// aux-build:intra-link-extern-crate.rs +//@ aux-build:intra-link-extern-crate.rs // When loading `extern crate` statements, we would pull in their docs at the same time, even // though they would never actually get displayed. This tripped intra-doc-link resolution failures, diff --git a/tests/rustdoc/intra-doc/extern-inherent-impl.rs b/tests/rustdoc/intra-doc/extern-inherent-impl.rs index 2e41c2214f4f..ac5ba8ddd058 100644 --- a/tests/rustdoc/intra-doc/extern-inherent-impl.rs +++ b/tests/rustdoc/intra-doc/extern-inherent-impl.rs @@ -1,7 +1,7 @@ // Reexport of a structure with public inherent impls having doc links in their comments. The doc // link points to an associated item, so we check that traits in scope for that link are populated. -// aux-build:extern-inherent-impl-dep.rs +//@ aux-build:extern-inherent-impl-dep.rs extern crate extern_inherent_impl_dep; diff --git a/tests/rustdoc/intra-doc/extern-reference-link.rs b/tests/rustdoc/intra-doc/extern-reference-link.rs index bad6ec755798..f24c7f039974 100644 --- a/tests/rustdoc/intra-doc/extern-reference-link.rs +++ b/tests/rustdoc/intra-doc/extern-reference-link.rs @@ -1,5 +1,5 @@ -// compile-flags: --extern pub_struct -// aux-build:pub-struct.rs +//@ compile-flags: --extern pub_struct +//@ aux-build:pub-struct.rs /// [SomeStruct] /// diff --git a/tests/rustdoc/intra-doc/external-traits.rs b/tests/rustdoc/intra-doc/external-traits.rs index a0a66f242c9f..0945f8b1621d 100644 --- a/tests/rustdoc/intra-doc/external-traits.rs +++ b/tests/rustdoc/intra-doc/external-traits.rs @@ -1,5 +1,5 @@ -// aux-build:intra-links-external-traits.rs -// ignore-cross-compile +//@ aux-build:intra-links-external-traits.rs +//@ ignore-cross-compile #![crate_name = "outer"] #![deny(rustdoc::broken_intra_doc_links)] diff --git a/tests/rustdoc/intra-doc/issue-103463.rs b/tests/rustdoc/intra-doc/issue-103463.rs index 4adf8a9a8a4a..9b5cb67fd32a 100644 --- a/tests/rustdoc/intra-doc/issue-103463.rs +++ b/tests/rustdoc/intra-doc/issue-103463.rs @@ -1,6 +1,6 @@ // The `Trait` is not pulled into the crate resulting in doc links in its methods being resolved. -// aux-build:issue-103463-aux.rs +//@ aux-build:issue-103463-aux.rs extern crate issue_103463_aux; use issue_103463_aux::Trait; diff --git a/tests/rustdoc/intra-doc/issue-104145.rs b/tests/rustdoc/intra-doc/issue-104145.rs index 9ce36740d60d..5690803af5ae 100644 --- a/tests/rustdoc/intra-doc/issue-104145.rs +++ b/tests/rustdoc/intra-doc/issue-104145.rs @@ -1,6 +1,6 @@ // Doc links in `Trait`'s methods are resolved because it has a local impl. -// aux-build:issue-103463-aux.rs +//@ aux-build:issue-103463-aux.rs extern crate issue_103463_aux; use issue_103463_aux::Trait; diff --git a/tests/rustdoc/intra-doc/issue-66159.rs b/tests/rustdoc/intra-doc/issue-66159.rs index 56742b39790a..b3e7f9171ade 100644 --- a/tests/rustdoc/intra-doc/issue-66159.rs +++ b/tests/rustdoc/intra-doc/issue-66159.rs @@ -1,5 +1,5 @@ -// aux-crate:priv:pub_struct=pub-struct.rs -// compile-flags:-Z unstable-options +//@ aux-crate:priv:pub_struct=pub-struct.rs +//@ compile-flags:-Z unstable-options // The issue was an ICE which meant that we never actually generated the docs // so if we have generated the docs, we're okay. diff --git a/tests/rustdoc/intra-doc/prim-methods-external-core.rs b/tests/rustdoc/intra-doc/prim-methods-external-core.rs index c3340af33d5a..76e96d7037f4 100644 --- a/tests/rustdoc/intra-doc/prim-methods-external-core.rs +++ b/tests/rustdoc/intra-doc/prim-methods-external-core.rs @@ -1,7 +1,7 @@ -// aux-build:my-core.rs -// build-aux-docs -// ignore-cross-compile -// only-linux +//@ aux-build:my-core.rs +//@ build-aux-docs +//@ ignore-cross-compile +//@ only-linux #![deny(rustdoc::broken_intra_doc_links)] #![feature(no_core, lang_items)] diff --git a/tests/rustdoc/intra-doc/private.rs b/tests/rustdoc/intra-doc/private.rs index 349091e9300b..d1ad210dc314 100644 --- a/tests/rustdoc/intra-doc/private.rs +++ b/tests/rustdoc/intra-doc/private.rs @@ -1,4 +1,4 @@ -// compile-flags: --document-private-items +//@ compile-flags: --document-private-items // make sure to update `rustdoc-ui/intra-doc/private.rs` if you update this file diff --git a/tests/rustdoc/intra-doc/proc-macro.rs b/tests/rustdoc/intra-doc/proc-macro.rs index 78379a90285f..e7c92259da18 100644 --- a/tests/rustdoc/intra-doc/proc-macro.rs +++ b/tests/rustdoc/intra-doc/proc-macro.rs @@ -1,5 +1,5 @@ -// aux-build:proc-macro-macro.rs -// build-aux-docs +//@ aux-build:proc-macro-macro.rs +//@ build-aux-docs #![deny(rustdoc::broken_intra_doc_links)] extern crate proc_macro_macro; diff --git a/tests/rustdoc/intra-doc/pub-use.rs b/tests/rustdoc/intra-doc/pub-use.rs index 8a998496cf56..f6347ed2eabf 100644 --- a/tests/rustdoc/intra-doc/pub-use.rs +++ b/tests/rustdoc/intra-doc/pub-use.rs @@ -1,4 +1,4 @@ -// aux-build: intra-link-pub-use.rs +//@ aux-build: intra-link-pub-use.rs #![deny(rustdoc::broken_intra_doc_links)] #![crate_name = "outer"] diff --git a/tests/rustdoc/intra-doc/reexport-additional-docs.rs b/tests/rustdoc/intra-doc/reexport-additional-docs.rs index 64683bacd651..7912fd3681e7 100644 --- a/tests/rustdoc/intra-doc/reexport-additional-docs.rs +++ b/tests/rustdoc/intra-doc/reexport-additional-docs.rs @@ -1,5 +1,5 @@ -// aux-build:intra-link-reexport-additional-docs.rs -// build-aux-docs +//@ aux-build:intra-link-reexport-additional-docs.rs +//@ build-aux-docs #![crate_name = "foo"] extern crate inner; diff --git a/tests/rustdoc/invalid.crate.name.rs b/tests/rustdoc/invalid.crate.name.rs index c19713b565af..189a6c921248 100644 --- a/tests/rustdoc/invalid.crate.name.rs +++ b/tests/rustdoc/invalid.crate.name.rs @@ -1,3 +1,3 @@ -// compile-flags: --crate-name foo +//@ compile-flags: --crate-name foo pub fn foo() {} diff --git a/tests/rustdoc/issue-100204-inline-impl-through-glob-import.rs b/tests/rustdoc/issue-100204-inline-impl-through-glob-import.rs index 3e20c5c0741e..95fd3c12d6f4 100644 --- a/tests/rustdoc/issue-100204-inline-impl-through-glob-import.rs +++ b/tests/rustdoc/issue-100204-inline-impl-through-glob-import.rs @@ -1,6 +1,6 @@ -// aux-build:issue-100204-aux.rs -// build-aux-docs -// ignore-cross-compile +//@ aux-build:issue-100204-aux.rs +//@ build-aux-docs +//@ ignore-cross-compile #![crate_name="second"] diff --git a/tests/rustdoc/issue-100241.rs b/tests/rustdoc/issue-100241.rs index 9e9cba13a22f..e4c613dd2791 100644 --- a/tests/rustdoc/issue-100241.rs +++ b/tests/rustdoc/issue-100241.rs @@ -1,7 +1,7 @@ //! See [`S`]. // Check that this isn't an ICE -// should-fail +//@ should-fail mod foo { pub use inner::S; diff --git a/tests/rustdoc/issue-110422-inner-private.rs b/tests/rustdoc/issue-110422-inner-private.rs index 43dc929ab074..ca9ec70aaa48 100644 --- a/tests/rustdoc/issue-110422-inner-private.rs +++ b/tests/rustdoc/issue-110422-inner-private.rs @@ -2,7 +2,7 @@ // This test ensures that inner items (except for implementations and macros) // don't appear in documentation. -// compile-flags: --document-private-items +//@ compile-flags: --document-private-items #![crate_name = "foo"] diff --git a/tests/rustdoc/issue-110629-private-type-cycle.rs b/tests/rustdoc/issue-110629-private-type-cycle.rs index a4efbb098f74..e8847d7f1252 100644 --- a/tests/rustdoc/issue-110629-private-type-cycle.rs +++ b/tests/rustdoc/issue-110629-private-type-cycle.rs @@ -1,4 +1,4 @@ -// compile-flags: --document-private-items +//@ compile-flags: --document-private-items #![feature(type_alias_impl_trait)] diff --git a/tests/rustdoc/issue-113982-doc_auto_cfg-reexport-foreign.rs b/tests/rustdoc/issue-113982-doc_auto_cfg-reexport-foreign.rs index 88b86d15c56a..6d84ceb0165b 100644 --- a/tests/rustdoc/issue-113982-doc_auto_cfg-reexport-foreign.rs +++ b/tests/rustdoc/issue-113982-doc_auto_cfg-reexport-foreign.rs @@ -1,4 +1,4 @@ -// aux-build: issue-113982-doc_auto_cfg-reexport-foreign.rs +//@ aux-build: issue-113982-doc_auto_cfg-reexport-foreign.rs #![feature(no_core, doc_auto_cfg)] #![no_core] diff --git a/tests/rustdoc/issue-57180.rs b/tests/rustdoc/issue-57180.rs index 14bd2b0fec0d..aa6b77583993 100644 --- a/tests/rustdoc/issue-57180.rs +++ b/tests/rustdoc/issue-57180.rs @@ -1,4 +1,4 @@ -// aux-build:issue-57180.rs +//@ aux-build:issue-57180.rs extern crate issue_57180; use issue_57180::Trait; diff --git a/tests/rustdoc/issue-61592.rs b/tests/rustdoc/issue-61592.rs index 4b6c37b94aa7..068310fa6a33 100644 --- a/tests/rustdoc/issue-61592.rs +++ b/tests/rustdoc/issue-61592.rs @@ -1,4 +1,4 @@ -// aux-build:issue-61592.rs +//@ aux-build:issue-61592.rs extern crate foo; diff --git a/tests/rustdoc/issue-67851-both.rs b/tests/rustdoc/issue-67851-both.rs index d69b94317341..ed59652838e1 100644 --- a/tests/rustdoc/issue-67851-both.rs +++ b/tests/rustdoc/issue-67851-both.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zunstable-options --document-private-items --document-hidden-items +//@ compile-flags: -Zunstable-options --document-private-items --document-hidden-items // @has issue_67851_both/struct.Hidden.html #[doc(hidden)] diff --git a/tests/rustdoc/issue-67851-hidden.rs b/tests/rustdoc/issue-67851-hidden.rs index 8a3cafe4c3dc..6d532adc06fd 100644 --- a/tests/rustdoc/issue-67851-hidden.rs +++ b/tests/rustdoc/issue-67851-hidden.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zunstable-options --document-hidden-items +//@ compile-flags: -Zunstable-options --document-hidden-items // @has issue_67851_hidden/struct.Hidden.html #[doc(hidden)] diff --git a/tests/rustdoc/issue-67851-private.rs b/tests/rustdoc/issue-67851-private.rs index 8addc7f3e4b5..ead7ddf397f8 100644 --- a/tests/rustdoc/issue-67851-private.rs +++ b/tests/rustdoc/issue-67851-private.rs @@ -1,4 +1,4 @@ -// compile-flags: --document-private-items +//@ compile-flags: --document-private-items // @!has issue_67851_private/struct.Hidden.html #[doc(hidden)] diff --git a/tests/rustdoc/issue-73061-cross-crate-opaque-assoc-type.rs b/tests/rustdoc/issue-73061-cross-crate-opaque-assoc-type.rs index 2700f2370eec..e16aeac65cc5 100644 --- a/tests/rustdoc/issue-73061-cross-crate-opaque-assoc-type.rs +++ b/tests/rustdoc/issue-73061-cross-crate-opaque-assoc-type.rs @@ -1,6 +1,6 @@ // Regression test for ICE #73061 -// aux-build:issue-73061.rs +//@ aux-build:issue-73061.rs extern crate issue_73061; diff --git a/tests/rustdoc/issue-75588.rs b/tests/rustdoc/issue-75588.rs index 3b11059a755d..4f790994b419 100644 --- a/tests/rustdoc/issue-75588.rs +++ b/tests/rustdoc/issue-75588.rs @@ -1,5 +1,5 @@ -// aux-build:realcore.rs -// aux-build:real_gimli.rs +//@ aux-build:realcore.rs +//@ aux-build:real_gimli.rs // Ensure unstably exported traits have their Implementors sections. diff --git a/tests/rustdoc/issue-81141-private-reexport-in-public-api-2.rs b/tests/rustdoc/issue-81141-private-reexport-in-public-api-2.rs index 4e9d188bbf8d..fba310cec6d6 100644 --- a/tests/rustdoc/issue-81141-private-reexport-in-public-api-2.rs +++ b/tests/rustdoc/issue-81141-private-reexport-in-public-api-2.rs @@ -1,4 +1,4 @@ -// edition:2015 +//@ edition:2015 #![crate_name = "foo"] diff --git a/tests/rustdoc/issue-81141-private-reexport-in-public-api-hidden.rs b/tests/rustdoc/issue-81141-private-reexport-in-public-api-hidden.rs index 5053a328bad8..388f69ba3265 100644 --- a/tests/rustdoc/issue-81141-private-reexport-in-public-api-hidden.rs +++ b/tests/rustdoc/issue-81141-private-reexport-in-public-api-hidden.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z unstable-options --document-hidden-items +//@ compile-flags: -Z unstable-options --document-hidden-items #![crate_name = "foo"] diff --git a/tests/rustdoc/issue-81141-private-reexport-in-public-api-private.rs b/tests/rustdoc/issue-81141-private-reexport-in-public-api-private.rs index 15749674a3db..2633f98c4f30 100644 --- a/tests/rustdoc/issue-81141-private-reexport-in-public-api-private.rs +++ b/tests/rustdoc/issue-81141-private-reexport-in-public-api-private.rs @@ -1,4 +1,4 @@ -// compile-flags: --document-private-items +//@ compile-flags: --document-private-items #![crate_name = "foo"] diff --git a/tests/rustdoc/issue-85454.rs b/tests/rustdoc/issue-85454.rs index 5a49a9d06519..790db0c5dcfe 100644 --- a/tests/rustdoc/issue-85454.rs +++ b/tests/rustdoc/issue-85454.rs @@ -1,5 +1,5 @@ -// aux-build:issue-85454.rs -// build-aux-docs +//@ aux-build:issue-85454.rs +//@ build-aux-docs #![crate_name = "foo"] extern crate issue_85454; diff --git a/tests/rustdoc/issue-86620.rs b/tests/rustdoc/issue-86620.rs index ef15946ec504..a7ac0f1d291b 100644 --- a/tests/rustdoc/issue-86620.rs +++ b/tests/rustdoc/issue-86620.rs @@ -1,4 +1,4 @@ -// aux-build:issue-86620-1.rs +//@ aux-build:issue-86620-1.rs extern crate issue_86620_1; diff --git a/tests/rustdoc/issue-89852.rs b/tests/rustdoc/issue-89852.rs index 4f2da5e07bee..e9b3d80c92ee 100644 --- a/tests/rustdoc/issue-89852.rs +++ b/tests/rustdoc/issue-89852.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![no_core] #![feature(no_core)] diff --git a/tests/rustdoc/issue-95633.rs b/tests/rustdoc/issue-95633.rs index a71d0a037318..5695ef579f2b 100644 --- a/tests/rustdoc/issue-95633.rs +++ b/tests/rustdoc/issue-95633.rs @@ -1,4 +1,4 @@ -// compile-flags: --document-private-items +//@ compile-flags: --document-private-items // This ensures that no ICE is triggered when rustdoc is run on this code. diff --git a/tests/rustdoc/issue-96381.rs b/tests/rustdoc/issue-96381.rs index f0f123f85a03..90875c076057 100644 --- a/tests/rustdoc/issue-96381.rs +++ b/tests/rustdoc/issue-96381.rs @@ -1,4 +1,4 @@ -// should-fail +//@ should-fail #![allow(unused)] diff --git a/tests/rustdoc/issue-98697.rs b/tests/rustdoc/issue-98697.rs index 5d5aee1fe1df..df9f29151113 100644 --- a/tests/rustdoc/issue-98697.rs +++ b/tests/rustdoc/issue-98697.rs @@ -1,5 +1,5 @@ -// aux-build:issue-98697-reexport-with-anonymous-lifetime.rs -// ignore-cross-compile +//@ aux-build:issue-98697-reexport-with-anonymous-lifetime.rs +//@ ignore-cross-compile // When reexporting a function with a HRTB with anonymous lifetimes, // make sure the anonymous lifetimes are not rendered. diff --git a/tests/rustdoc/issue-99221-multiple-macro-rules-w-same-name-submodule.rs b/tests/rustdoc/issue-99221-multiple-macro-rules-w-same-name-submodule.rs index e74881d387dc..d3ccd1c069b6 100644 --- a/tests/rustdoc/issue-99221-multiple-macro-rules-w-same-name-submodule.rs +++ b/tests/rustdoc/issue-99221-multiple-macro-rules-w-same-name-submodule.rs @@ -1,6 +1,6 @@ -// aux-build:issue-99221-aux.rs -// build-aux-docs -// ignore-cross-compile +//@ aux-build:issue-99221-aux.rs +//@ build-aux-docs +//@ ignore-cross-compile #![crate_name = "foo"] diff --git a/tests/rustdoc/issue-99221-multiple-macro-rules-w-same-name.rs b/tests/rustdoc/issue-99221-multiple-macro-rules-w-same-name.rs index 46d59654b99e..f4f62717cea9 100644 --- a/tests/rustdoc/issue-99221-multiple-macro-rules-w-same-name.rs +++ b/tests/rustdoc/issue-99221-multiple-macro-rules-w-same-name.rs @@ -1,6 +1,6 @@ -// aux-build:issue-99221-aux.rs -// build-aux-docs -// ignore-cross-compile +//@ aux-build:issue-99221-aux.rs +//@ build-aux-docs +//@ ignore-cross-compile #![crate_name = "foo"] diff --git a/tests/rustdoc/issue-99221-multiple-structs-w-same-name.rs b/tests/rustdoc/issue-99221-multiple-structs-w-same-name.rs index ba29a77ebdff..4852ee71da7d 100644 --- a/tests/rustdoc/issue-99221-multiple-structs-w-same-name.rs +++ b/tests/rustdoc/issue-99221-multiple-structs-w-same-name.rs @@ -1,6 +1,6 @@ -// aux-build:issue-99221-aux.rs -// build-aux-docs -// ignore-cross-compile +//@ aux-build:issue-99221-aux.rs +//@ build-aux-docs +//@ ignore-cross-compile #![crate_name = "foo"] diff --git a/tests/rustdoc/issue-99734-multiple-foreigns-w-same-name.rs b/tests/rustdoc/issue-99734-multiple-foreigns-w-same-name.rs index b56ec6e11eaf..9c94fdd91600 100644 --- a/tests/rustdoc/issue-99734-multiple-foreigns-w-same-name.rs +++ b/tests/rustdoc/issue-99734-multiple-foreigns-w-same-name.rs @@ -1,6 +1,6 @@ -// aux-build:issue-99734-aux.rs -// build-aux-docs -// ignore-cross-compile +//@ aux-build:issue-99734-aux.rs +//@ build-aux-docs +//@ ignore-cross-compile #![crate_name = "foo"] diff --git a/tests/rustdoc/issue-99734-multiple-mods-w-same-name.rs b/tests/rustdoc/issue-99734-multiple-mods-w-same-name.rs index 8f5d6fa3d56d..41aeb30a461b 100644 --- a/tests/rustdoc/issue-99734-multiple-mods-w-same-name.rs +++ b/tests/rustdoc/issue-99734-multiple-mods-w-same-name.rs @@ -1,6 +1,6 @@ -// aux-build:issue-99734-aux.rs -// build-aux-docs -// ignore-cross-compile +//@ aux-build:issue-99734-aux.rs +//@ build-aux-docs +//@ ignore-cross-compile #![crate_name = "foo"] diff --git a/tests/rustdoc/jump-to-def-doc-links-calls.rs b/tests/rustdoc/jump-to-def-doc-links-calls.rs index 549d068528e2..4101058edbf4 100644 --- a/tests/rustdoc/jump-to-def-doc-links-calls.rs +++ b/tests/rustdoc/jump-to-def-doc-links-calls.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zunstable-options --generate-link-to-definition +//@ compile-flags: -Zunstable-options --generate-link-to-definition #![crate_name = "foo"] diff --git a/tests/rustdoc/jump-to-def-doc-links.rs b/tests/rustdoc/jump-to-def-doc-links.rs index 014d5803299c..1722aa404370 100644 --- a/tests/rustdoc/jump-to-def-doc-links.rs +++ b/tests/rustdoc/jump-to-def-doc-links.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zunstable-options --generate-link-to-definition +//@ compile-flags: -Zunstable-options --generate-link-to-definition #![crate_name = "foo"] diff --git a/tests/rustdoc/jump-to-non-local-method.rs b/tests/rustdoc/jump-to-non-local-method.rs index 7767b92fbe55..bc44d9a97088 100644 --- a/tests/rustdoc/jump-to-non-local-method.rs +++ b/tests/rustdoc/jump-to-non-local-method.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zunstable-options --generate-link-to-definition +//@ compile-flags: -Zunstable-options --generate-link-to-definition #![crate_name = "foo"] diff --git a/tests/rustdoc/link-extern-crate-33178.rs b/tests/rustdoc/link-extern-crate-33178.rs index 6a63712c4a78..d62bab5111f4 100644 --- a/tests/rustdoc/link-extern-crate-33178.rs +++ b/tests/rustdoc/link-extern-crate-33178.rs @@ -1,7 +1,7 @@ -// aux-build:empty.rs -// aux-build:variant-struct.rs -// build-aux-docs -// ignore-cross-compile +//@ aux-build:empty.rs +//@ aux-build:variant-struct.rs +//@ build-aux-docs +//@ ignore-cross-compile // https://github.com/rust-lang/rust/issues/33178 #![crate_name="issue_33178"] diff --git a/tests/rustdoc/link-extern-crate-item-30109.rs b/tests/rustdoc/link-extern-crate-item-30109.rs index c83234352ad3..a57d16da820e 100644 --- a/tests/rustdoc/link-extern-crate-item-30109.rs +++ b/tests/rustdoc/link-extern-crate-item-30109.rs @@ -1,6 +1,6 @@ -// build-aux-docs -// aux-build:issue-30109-1.rs -// ignore-cross-compile +//@ build-aux-docs +//@ aux-build:issue-30109-1.rs +//@ ignore-cross-compile // https://github.com/rust-lang/rust/issues/30109 #![crate_name="issue_30109"] diff --git a/tests/rustdoc/link-extern-crate-title-33178.rs b/tests/rustdoc/link-extern-crate-title-33178.rs index d2f115a386e9..e85ddb2c891c 100644 --- a/tests/rustdoc/link-extern-crate-title-33178.rs +++ b/tests/rustdoc/link-extern-crate-title-33178.rs @@ -1,6 +1,6 @@ -// aux-build:empty.rs -// aux-build:variant-struct.rs -// ignore-cross-compile +//@ aux-build:empty.rs +//@ aux-build:variant-struct.rs +//@ ignore-cross-compile // https://github.com/rust-lang/rust/issues/33178 #![crate_name="issue_33178_1"] diff --git a/tests/rustdoc/macro-document-private-duplicate.rs b/tests/rustdoc/macro-document-private-duplicate.rs index d3cf7e140650..703317be8c93 100644 --- a/tests/rustdoc/macro-document-private-duplicate.rs +++ b/tests/rustdoc/macro-document-private-duplicate.rs @@ -1,4 +1,4 @@ -// ignore-test (fails spuriously, see issue #89228) +//@ ignore-test (fails spuriously, see issue #89228) // FIXME: If two macros in the same module have the same name // (yes, that's a thing), rustdoc lists both of them on the index page, @@ -8,7 +8,7 @@ // // See https://github.com/rust-lang/rust/pull/88019#discussion_r693920453 // -// compile-flags: --document-private-items +//@ compile-flags: --document-private-items // @hasraw macro_document_private_duplicate/index.html 'Doc 1.' // @hasraw macro_document_private_duplicate/macro.a_macro.html 'Doc 1.' diff --git a/tests/rustdoc/macro-document-private.rs b/tests/rustdoc/macro-document-private.rs index d2496913ffcf..2252aa87ebaa 100644 --- a/tests/rustdoc/macro-document-private.rs +++ b/tests/rustdoc/macro-document-private.rs @@ -3,7 +3,7 @@ // // This is a regression test for issue #73754. // -// compile-flags: --document-private-items +//@ compile-flags: --document-private-items #![feature(decl_macro)] diff --git a/tests/rustdoc/macro-in-async-block.rs b/tests/rustdoc/macro-in-async-block.rs index b4aaacf7b3d4..43822fb9c52a 100644 --- a/tests/rustdoc/macro-in-async-block.rs +++ b/tests/rustdoc/macro-in-async-block.rs @@ -1,5 +1,5 @@ // Regression issue for rustdoc ICE encountered in PR #72088. -// edition:2018 +//@ edition:2018 #![feature(decl_macro)] fn main() { diff --git a/tests/rustdoc/macro_pub_in_module.rs b/tests/rustdoc/macro_pub_in_module.rs index 42f760cff6a7..06b7047893bb 100644 --- a/tests/rustdoc/macro_pub_in_module.rs +++ b/tests/rustdoc/macro_pub_in_module.rs @@ -1,6 +1,6 @@ -// aux-build:macro_pub_in_module.rs -// edition:2018 -// build-aux-docs +//@ aux-build:macro_pub_in_module.rs +//@ edition:2018 +//@ build-aux-docs //! See issue #74355 #![feature(decl_macro, no_core, rustc_attrs)] diff --git a/tests/rustdoc/masked.rs b/tests/rustdoc/masked.rs index 875c026fd058..03e5e53f424f 100644 --- a/tests/rustdoc/masked.rs +++ b/tests/rustdoc/masked.rs @@ -1,4 +1,4 @@ -// aux-build:masked.rs +//@ aux-build:masked.rs #![feature(doc_masked)] diff --git a/tests/rustdoc/method-link-foreign-trait-impl-17476.rs b/tests/rustdoc/method-link-foreign-trait-impl-17476.rs index e52ab6f38c2a..5f341e6c21cb 100644 --- a/tests/rustdoc/method-link-foreign-trait-impl-17476.rs +++ b/tests/rustdoc/method-link-foreign-trait-impl-17476.rs @@ -1,5 +1,5 @@ -// aux-build:issue-17476.rs -// ignore-cross-compile +//@ aux-build:issue-17476.rs +//@ ignore-cross-compile // https://github.com/rust-lang/rust/issues/17476 #![crate_name="issue_17476"] diff --git a/tests/rustdoc/mod-stackoverflow.rs b/tests/rustdoc/mod-stackoverflow.rs index 45b1de2162d9..7dbbca13acea 100644 --- a/tests/rustdoc/mod-stackoverflow.rs +++ b/tests/rustdoc/mod-stackoverflow.rs @@ -1,5 +1,5 @@ -// aux-build:mod-stackoverflow.rs -// ignore-cross-compile +//@ aux-build:mod-stackoverflow.rs +//@ ignore-cross-compile extern crate mod_stackoverflow; pub use mod_stackoverflow::tree; diff --git a/tests/rustdoc/no-compiler-reexport.rs b/tests/rustdoc/no-compiler-reexport.rs index d28fdf87b77a..d1567c4fddab 100644 --- a/tests/rustdoc/no-compiler-reexport.rs +++ b/tests/rustdoc/no-compiler-reexport.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z unstable-options --document-hidden-items --document-private-items +//@ compile-flags: -Z unstable-options --document-hidden-items --document-private-items #![crate_name = "foo"] diff --git a/tests/rustdoc/no-run-still-checks-lints.rs b/tests/rustdoc/no-run-still-checks-lints.rs index 9f7d1c8845dc..73e311b72d5e 100644 --- a/tests/rustdoc/no-run-still-checks-lints.rs +++ b/tests/rustdoc/no-run-still-checks-lints.rs @@ -1,5 +1,5 @@ -// compile-flags:--test -// should-fail +//@ compile-flags:--test +//@ should-fail #![doc(test(attr(deny(warnings))))] diff --git a/tests/rustdoc/no-stack-overflow-25295.rs b/tests/rustdoc/no-stack-overflow-25295.rs index dd79f1e4baaa..50bfb8adb614 100644 --- a/tests/rustdoc/no-stack-overflow-25295.rs +++ b/tests/rustdoc/no-stack-overflow-25295.rs @@ -1,5 +1,5 @@ // Ensure this code doesn't stack overflow. -// aux-build:enum-primitive.rs +//@ aux-build:enum-primitive.rs #[macro_use] extern crate enum_primitive; diff --git a/tests/rustdoc/normalize-assoc-item.rs b/tests/rustdoc/normalize-assoc-item.rs index d39e1b15a4cb..d45bb1bff65c 100644 --- a/tests/rustdoc/normalize-assoc-item.rs +++ b/tests/rustdoc/normalize-assoc-item.rs @@ -1,7 +1,7 @@ // ignore-tidy-linelength -// aux-build:normalize-assoc-item.rs -// build-aux-docs -// compile-flags:-Znormalize-docs +//@ aux-build:normalize-assoc-item.rs +//@ build-aux-docs +//@ compile-flags:-Znormalize-docs pub trait Trait { type X; diff --git a/tests/rustdoc/nul-error.rs b/tests/rustdoc/nul-error.rs index 3d30f5f6b77f..e8aa786534b3 100644 --- a/tests/rustdoc/nul-error.rs +++ b/tests/rustdoc/nul-error.rs @@ -1,5 +1,5 @@ -// build-aux-docs -// ignore-cross-compile +//@ build-aux-docs +//@ ignore-cross-compile #![crate_name = "foo"] diff --git a/tests/rustdoc/playground-arg.rs b/tests/rustdoc/playground-arg.rs index 1d7085064e5a..58d87c653b48 100644 --- a/tests/rustdoc/playground-arg.rs +++ b/tests/rustdoc/playground-arg.rs @@ -1,4 +1,4 @@ -// compile-flags: --playground-url=https://example.com/ -Z unstable-options +//@ compile-flags: --playground-url=https://example.com/ -Z unstable-options #![crate_name = "foo"] diff --git a/tests/rustdoc/playground-empty.rs b/tests/rustdoc/playground-empty.rs index 7d8bd3ffe0d6..bfba9ffdbf46 100644 --- a/tests/rustdoc/playground-empty.rs +++ b/tests/rustdoc/playground-empty.rs @@ -2,7 +2,7 @@ #![doc(html_playground_url = "")] -// compile-flags:-Z unstable-options --playground-url https://play.rust-lang.org/ +//@ compile-flags:-Z unstable-options --playground-url https://play.rust-lang.org/ //! module docs //! diff --git a/tests/rustdoc/primitive-raw-pointer-link-15318.rs b/tests/rustdoc/primitive-raw-pointer-link-15318.rs index 77f25ff4cff0..66d84e9aaa34 100644 --- a/tests/rustdoc/primitive-raw-pointer-link-15318.rs +++ b/tests/rustdoc/primitive-raw-pointer-link-15318.rs @@ -1,5 +1,5 @@ -// aux-build:issue-15318.rs -// ignore-cross-compile +//@ aux-build:issue-15318.rs +//@ ignore-cross-compile // https://github.com/rust-lang/rust/issues/15318 #![crate_name="issue_15318"] diff --git a/tests/rustdoc/primitive-raw-pointer-link-no-inlined-15318-2.rs b/tests/rustdoc/primitive-raw-pointer-link-no-inlined-15318-2.rs index 1b35bb185ed4..e6c69c3407e6 100644 --- a/tests/rustdoc/primitive-raw-pointer-link-no-inlined-15318-2.rs +++ b/tests/rustdoc/primitive-raw-pointer-link-no-inlined-15318-2.rs @@ -1,5 +1,5 @@ -// aux-build:issue-15318.rs -// ignore-cross-compile +//@ aux-build:issue-15318.rs +//@ ignore-cross-compile // https://github.com/rust-lang/rust/issues/15318 #![crate_name="issue_15318_2"] diff --git a/tests/rustdoc/primitive-reexport.rs b/tests/rustdoc/primitive-reexport.rs index 10a8a47db524..7dbb7c6db508 100644 --- a/tests/rustdoc/primitive-reexport.rs +++ b/tests/rustdoc/primitive-reexport.rs @@ -1,5 +1,5 @@ -// aux-build: primitive-reexport.rs -// compile-flags:--extern foo --edition 2018 +//@ aux-build: primitive-reexport.rs +//@ compile-flags:--extern foo --edition 2018 #![crate_name = "bar"] diff --git a/tests/rustdoc/primitive-slice-auto-trait.rs b/tests/rustdoc/primitive-slice-auto-trait.rs index ba15a73ca1d1..359a08f6a313 100644 --- a/tests/rustdoc/primitive-slice-auto-trait.rs +++ b/tests/rustdoc/primitive-slice-auto-trait.rs @@ -1,4 +1,4 @@ -// compile-flags: --crate-type lib --edition 2018 +//@ compile-flags: --crate-type lib --edition 2018 #![crate_name = "foo"] #![feature(rustc_attrs)] diff --git a/tests/rustdoc/primitive-tuple-auto-trait.rs b/tests/rustdoc/primitive-tuple-auto-trait.rs index 2b407b586a3d..79737da3a2d0 100644 --- a/tests/rustdoc/primitive-tuple-auto-trait.rs +++ b/tests/rustdoc/primitive-tuple-auto-trait.rs @@ -1,4 +1,4 @@ -// compile-flags: --crate-type lib --edition 2018 +//@ compile-flags: --crate-type lib --edition 2018 #![crate_name = "foo"] #![feature(rustc_attrs)] diff --git a/tests/rustdoc/primitive-tuple-variadic.rs b/tests/rustdoc/primitive-tuple-variadic.rs index 846028bbb190..546cf2ace425 100644 --- a/tests/rustdoc/primitive-tuple-variadic.rs +++ b/tests/rustdoc/primitive-tuple-variadic.rs @@ -1,4 +1,4 @@ -// compile-flags: --crate-type lib --edition 2018 +//@ compile-flags: --crate-type lib --edition 2018 #![crate_name = "foo"] #![feature(rustdoc_internals)] diff --git a/tests/rustdoc/primitive-unit-auto-trait.rs b/tests/rustdoc/primitive-unit-auto-trait.rs index 5a56f1fd83bd..ff86a555cda1 100644 --- a/tests/rustdoc/primitive-unit-auto-trait.rs +++ b/tests/rustdoc/primitive-unit-auto-trait.rs @@ -1,4 +1,4 @@ -// compile-flags: --crate-type lib --edition 2018 +//@ compile-flags: --crate-type lib --edition 2018 #![crate_name = "foo"] #![feature(rustc_attrs)] diff --git a/tests/rustdoc/proc-macro.rs b/tests/rustdoc/proc-macro.rs index 10acb7ac495e..57bf228052ce 100644 --- a/tests/rustdoc/proc-macro.rs +++ b/tests/rustdoc/proc-macro.rs @@ -1,6 +1,6 @@ -// force-host -// no-prefer-dynamic -// compile-flags: --crate-type proc-macro --document-private-items +//@ force-host +//@ no-prefer-dynamic +//@ compile-flags: --crate-type proc-macro --document-private-items #![crate_type="proc-macro"] #![crate_name="some_macros"] diff --git a/tests/rustdoc/process-termination.rs b/tests/rustdoc/process-termination.rs index 32258792b6e8..73a86e57424a 100644 --- a/tests/rustdoc/process-termination.rs +++ b/tests/rustdoc/process-termination.rs @@ -1,4 +1,4 @@ -// compile-flags:--test +//@ compile-flags:--test /// A check of using various process termination strategies /// diff --git a/tests/rustdoc/pub-extern-crate.rs b/tests/rustdoc/pub-extern-crate.rs index 26747a4d1aca..c5be51f35ac5 100644 --- a/tests/rustdoc/pub-extern-crate.rs +++ b/tests/rustdoc/pub-extern-crate.rs @@ -1,4 +1,4 @@ -// aux-build:pub-extern-crate.rs +//@ aux-build:pub-extern-crate.rs // @has pub_extern_crate/index.html // @!has - '//code' 'pub extern crate inner' diff --git a/tests/rustdoc/pub-method.rs b/tests/rustdoc/pub-method.rs index ea4791579cd6..2a77aa753520 100644 --- a/tests/rustdoc/pub-method.rs +++ b/tests/rustdoc/pub-method.rs @@ -1,4 +1,4 @@ -// compile-flags: --document-private-items +//@ compile-flags: --document-private-items #![crate_name = "foo"] diff --git a/tests/rustdoc/pub-use-extern-macros.rs b/tests/rustdoc/pub-use-extern-macros.rs index eefe6b4b0736..d3d667297fbc 100644 --- a/tests/rustdoc/pub-use-extern-macros.rs +++ b/tests/rustdoc/pub-use-extern-macros.rs @@ -1,4 +1,4 @@ -// aux-build:pub-use-extern-macros.rs +//@ aux-build:pub-use-extern-macros.rs extern crate macros; diff --git a/tests/rustdoc/redirect-map-empty.rs b/tests/rustdoc/redirect-map-empty.rs index e9d021e0fa86..12e500e785e0 100644 --- a/tests/rustdoc/redirect-map-empty.rs +++ b/tests/rustdoc/redirect-map-empty.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z unstable-options --generate-redirect-map +//@ compile-flags: -Z unstable-options --generate-redirect-map #![crate_name = "foo"] diff --git a/tests/rustdoc/redirect-map.rs b/tests/rustdoc/redirect-map.rs index b7f16b64e385..3ad252984943 100644 --- a/tests/rustdoc/redirect-map.rs +++ b/tests/rustdoc/redirect-map.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z unstable-options --generate-redirect-map +//@ compile-flags: -Z unstable-options --generate-redirect-map #![crate_name = "foo"] diff --git a/tests/rustdoc/redirect.rs b/tests/rustdoc/redirect.rs index 4fb81c23d39e..dc3a06b94d0c 100644 --- a/tests/rustdoc/redirect.rs +++ b/tests/rustdoc/redirect.rs @@ -1,6 +1,6 @@ -// aux-build:reexp-stripped.rs -// build-aux-docs -// ignore-cross-compile +//@ aux-build:reexp-stripped.rs +//@ build-aux-docs +//@ ignore-cross-compile extern crate reexp_stripped; diff --git a/tests/rustdoc/reexport-check.rs b/tests/rustdoc/reexport-check.rs index 5908d2150f2a..92729b82ae21 100644 --- a/tests/rustdoc/reexport-check.rs +++ b/tests/rustdoc/reexport-check.rs @@ -1,4 +1,4 @@ -// aux-build:reexport-check.rs +//@ aux-build:reexport-check.rs #![crate_name = "foo"] extern crate reexport_check; diff --git a/tests/rustdoc/reexport-dep-foreign-fn.rs b/tests/rustdoc/reexport-dep-foreign-fn.rs index e7f5720d583c..1da3d8044b9d 100644 --- a/tests/rustdoc/reexport-dep-foreign-fn.rs +++ b/tests/rustdoc/reexport-dep-foreign-fn.rs @@ -1,4 +1,4 @@ -// aux-build:all-item-types.rs +//@ aux-build:all-item-types.rs // This test is to ensure there is no problem on handling foreign functions // coming from a dependency. diff --git a/tests/rustdoc/reexport-doc.rs b/tests/rustdoc/reexport-doc.rs index df2c889b4d57..cb1a398b1c38 100644 --- a/tests/rustdoc/reexport-doc.rs +++ b/tests/rustdoc/reexport-doc.rs @@ -1,4 +1,4 @@ -// aux-build:reexport-doc-aux.rs +//@ aux-build:reexport-doc-aux.rs extern crate reexport_doc_aux as dep; diff --git a/tests/rustdoc/reexports-priv.rs b/tests/rustdoc/reexports-priv.rs index 571d7f06fdc6..1eee262d2330 100644 --- a/tests/rustdoc/reexports-priv.rs +++ b/tests/rustdoc/reexports-priv.rs @@ -1,5 +1,5 @@ -// aux-build: reexports.rs -// compile-flags: --document-private-items +//@ aux-build: reexports.rs +//@ compile-flags: --document-private-items #![crate_name = "foo"] diff --git a/tests/rustdoc/reexports.rs b/tests/rustdoc/reexports.rs index 3c51ac395afc..e1da1fd552fc 100644 --- a/tests/rustdoc/reexports.rs +++ b/tests/rustdoc/reexports.rs @@ -1,4 +1,4 @@ -// aux-build: reexports.rs +//@ aux-build: reexports.rs #![crate_name = "foo"] diff --git a/tests/rustdoc/render-enum-variant-structlike-32395.rs b/tests/rustdoc/render-enum-variant-structlike-32395.rs index 2200d8ec6377..dbe40304c17a 100644 --- a/tests/rustdoc/render-enum-variant-structlike-32395.rs +++ b/tests/rustdoc/render-enum-variant-structlike-32395.rs @@ -1,6 +1,6 @@ -// aux-build:variant-struct.rs -// build-aux-docs -// ignore-cross-compile +//@ aux-build:variant-struct.rs +//@ build-aux-docs +//@ ignore-cross-compile // https://github.com/rust-lang/rust/issues/32395 #![crate_name="issue_32395"] diff --git a/tests/rustdoc/rustc-incoherent-impls.rs b/tests/rustdoc/rustc-incoherent-impls.rs index 3fdefbecc546..4f0eca291f79 100644 --- a/tests/rustdoc/rustc-incoherent-impls.rs +++ b/tests/rustdoc/rustc-incoherent-impls.rs @@ -1,5 +1,5 @@ -// aux-build:incoherent-impl-types.rs -// build-aux-docs +//@ aux-build:incoherent-impl-types.rs +//@ build-aux-docs #![crate_name = "foo"] #![feature(rustc_attrs)] diff --git a/tests/rustdoc/rustc-macro-crate.rs b/tests/rustdoc/rustc-macro-crate.rs index dd5edc984daf..f0443364bb2c 100644 --- a/tests/rustdoc/rustc-macro-crate.rs +++ b/tests/rustdoc/rustc-macro-crate.rs @@ -1,6 +1,6 @@ -// force-host -// no-prefer-dynamic -// compile-flags: --crate-type proc-macro +//@ force-host +//@ no-prefer-dynamic +//@ compile-flags: --crate-type proc-macro #![crate_type = "proc-macro"] diff --git a/tests/rustdoc/sanitizer-option.rs b/tests/rustdoc/sanitizer-option.rs index 1abba468febf..2adf1be51fd7 100644 --- a/tests/rustdoc/sanitizer-option.rs +++ b/tests/rustdoc/sanitizer-option.rs @@ -1,6 +1,6 @@ -// needs-sanitizer-support -// needs-sanitizer-address -// compile-flags: --test -Z sanitizer=address +//@ needs-sanitizer-support +//@ needs-sanitizer-address +//@ compile-flags: --test -Z sanitizer=address // // #43031: Verify that rustdoc passes `-Z` options to rustc. Use an extern // function that is provided by the sanitizer runtime, if flag is not passed diff --git a/tests/rustdoc/sort-modules-by-appearance.rs b/tests/rustdoc/sort-modules-by-appearance.rs index b5cc8bc8304e..2d224107d226 100644 --- a/tests/rustdoc/sort-modules-by-appearance.rs +++ b/tests/rustdoc/sort-modules-by-appearance.rs @@ -1,7 +1,7 @@ // Tests the rustdoc --sort-modules-by-appearance option, that allows module declarations to appear // in the order they are declared in the source code, rather than only alphabetically. -// compile-flags: -Z unstable-options --sort-modules-by-appearance +//@ compile-flags: -Z unstable-options --sort-modules-by-appearance pub mod module_b {} diff --git a/tests/rustdoc/src-link-external-macro-26606.rs b/tests/rustdoc/src-link-external-macro-26606.rs index de717a5273bb..a5b34867869b 100644 --- a/tests/rustdoc/src-link-external-macro-26606.rs +++ b/tests/rustdoc/src-link-external-macro-26606.rs @@ -1,6 +1,6 @@ -// aux-build:issue-26606-macro.rs -// ignore-cross-compile -// build-aux-docs +//@ aux-build:issue-26606-macro.rs +//@ ignore-cross-compile +//@ build-aux-docs // https://github.com/rust-lang/rust/issues/26606 #![crate_name="issue_26606"] diff --git a/tests/rustdoc/src-links-external.rs b/tests/rustdoc/src-links-external.rs index 8012e442213b..fd48b964ab91 100644 --- a/tests/rustdoc/src-links-external.rs +++ b/tests/rustdoc/src-links-external.rs @@ -1,6 +1,6 @@ -// aux-build:src-links-external.rs -// build-aux-docs -// ignore-cross-compile +//@ aux-build:src-links-external.rs +//@ build-aux-docs +//@ ignore-cross-compile #![crate_name = "foo"] diff --git a/tests/rustdoc/src-links-implementor-43893.rs b/tests/rustdoc/src-links-implementor-43893.rs index 07e672847ca6..811957c430b4 100644 --- a/tests/rustdoc/src-links-implementor-43893.rs +++ b/tests/rustdoc/src-links-implementor-43893.rs @@ -1,4 +1,4 @@ -// ignore-cross-compile +//@ ignore-cross-compile // https://github.com/rust-lang/rust/issues/43893 diff --git a/tests/rustdoc/src-links-inlined-34274.rs b/tests/rustdoc/src-links-inlined-34274.rs index a3c9bf7e45c5..6d6999cf8664 100644 --- a/tests/rustdoc/src-links-inlined-34274.rs +++ b/tests/rustdoc/src-links-inlined-34274.rs @@ -1,6 +1,6 @@ -// aux-build:issue-34274.rs -// build-aux-docs -// ignore-cross-compile +//@ aux-build:issue-34274.rs +//@ build-aux-docs +//@ ignore-cross-compile // https://github.com/rust-lang/rust/issues/34274 #![crate_name = "foo"] diff --git a/tests/rustdoc/src-mod-path-absolute-26995.rs b/tests/rustdoc/src-mod-path-absolute-26995.rs index b67fd9b26db4..47045503bb94 100644 --- a/tests/rustdoc/src-mod-path-absolute-26995.rs +++ b/tests/rustdoc/src-mod-path-absolute-26995.rs @@ -1,5 +1,5 @@ -// ignore-windows -// compile-flags: --no-defaults +//@ ignore-windows +//@ compile-flags: --no-defaults // https://github.com/rust-lang/rust/issues/26995 #![crate_name="issue_26995"] diff --git a/tests/rustdoc/static-root-path.rs b/tests/rustdoc/static-root-path.rs index 3148ea047b78..e101d152fee7 100644 --- a/tests/rustdoc/static-root-path.rs +++ b/tests/rustdoc/static-root-path.rs @@ -1,4 +1,4 @@ -// compile-flags:-Z unstable-options --static-root-path /cache/ +//@ compile-flags:-Z unstable-options --static-root-path /cache/ // @has static_root_path/struct.SomeStruct.html // @matchesraw - '"/cache/main-' diff --git a/tests/rustdoc/static.rs b/tests/rustdoc/static.rs index 90dafd8b3480..d127f0c58297 100644 --- a/tests/rustdoc/static.rs +++ b/tests/rustdoc/static.rs @@ -1,4 +1,4 @@ -// compile-flags: --document-private-items +//@ compile-flags: --document-private-items #![crate_type = "lib"] diff --git a/tests/rustdoc/strip-priv-imports-pass-27104.rs b/tests/rustdoc/strip-priv-imports-pass-27104.rs index e400a8f50118..b7198e82a032 100644 --- a/tests/rustdoc/strip-priv-imports-pass-27104.rs +++ b/tests/rustdoc/strip-priv-imports-pass-27104.rs @@ -1,6 +1,6 @@ -// compile-flags:--no-defaults --passes strip-priv-imports -// aux-build:empty.rs -// ignore-cross-compile +//@ compile-flags:--no-defaults --passes strip-priv-imports +//@ aux-build:empty.rs +//@ ignore-cross-compile // https://github.com/rust-lang/rust/issues/27104 #![crate_name="issue_27104"] diff --git a/tests/rustdoc/synthetic_auto/no-redundancy.rs b/tests/rustdoc/synthetic_auto/no-redundancy.rs index fed9c9c7ba47..d30b38dd4dc1 100644 --- a/tests/rustdoc/synthetic_auto/no-redundancy.rs +++ b/tests/rustdoc/synthetic_auto/no-redundancy.rs @@ -1,5 +1,5 @@ // FIXME(fmease, #119216): Reenable this test! -// ignore-test +//@ ignore-test pub struct Inner { field: T, diff --git a/tests/rustdoc/test_option_check/bar.rs b/tests/rustdoc/test_option_check/bar.rs index 50a182cf7e04..7c2309a79d4b 100644 --- a/tests/rustdoc/test_option_check/bar.rs +++ b/tests/rustdoc/test_option_check/bar.rs @@ -1,5 +1,5 @@ -// compile-flags: --test -// check-test-line-numbers-match +//@ compile-flags: --test +//@ check-test-line-numbers-match /// This looks like another awesome test! /// diff --git a/tests/rustdoc/test_option_check/test.rs b/tests/rustdoc/test_option_check/test.rs index 964e8e37ed58..af7a5827690f 100644 --- a/tests/rustdoc/test_option_check/test.rs +++ b/tests/rustdoc/test_option_check/test.rs @@ -1,5 +1,5 @@ -// compile-flags: --test -// check-test-line-numbers-match +//@ compile-flags: --test +//@ check-test-line-numbers-match pub mod bar; diff --git a/tests/rustdoc/trait-alias-mention.rs b/tests/rustdoc/trait-alias-mention.rs index 6da0dc68785c..102bdca7d35a 100644 --- a/tests/rustdoc/trait-alias-mention.rs +++ b/tests/rustdoc/trait-alias-mention.rs @@ -1,5 +1,5 @@ -// aux-build:trait-alias-mention.rs -// build-aux-docs +//@ aux-build:trait-alias-mention.rs +//@ build-aux-docs #![crate_name = "foo"] diff --git a/tests/rustdoc/trait-visibility.rs b/tests/rustdoc/trait-visibility.rs index 8ba3ee03a74f..af9750ac8d0f 100644 --- a/tests/rustdoc/trait-visibility.rs +++ b/tests/rustdoc/trait-visibility.rs @@ -1,4 +1,4 @@ -// aux-build:trait-visibility.rs +//@ aux-build:trait-visibility.rs #![crate_name = "foo"] diff --git a/tests/rustdoc/traits-in-bodies-private.rs b/tests/rustdoc/traits-in-bodies-private.rs index 96b7c4f9dc07..5a21b8b26256 100644 --- a/tests/rustdoc/traits-in-bodies-private.rs +++ b/tests/rustdoc/traits-in-bodies-private.rs @@ -1,7 +1,7 @@ // when implementing the fix for traits-in-bodies, there was an ICE when documenting private items // and a trait was defined in non-module scope -// compile-flags:--document-private-items +//@ compile-flags:--document-private-items // @has traits_in_bodies_private/struct.SomeStruct.html // @!has - '//code' 'impl HiddenTrait for SomeStruct' diff --git a/tests/rustdoc/type-alias/cross-crate-115718.rs b/tests/rustdoc/type-alias/cross-crate-115718.rs index 372e62e42133..3d94be5ddbdd 100644 --- a/tests/rustdoc/type-alias/cross-crate-115718.rs +++ b/tests/rustdoc/type-alias/cross-crate-115718.rs @@ -1,4 +1,4 @@ -// aux-build: parent-crate-115718.rs +//@ aux-build: parent-crate-115718.rs // https://github.com/rust-lang/rust/issues/115718 #![crate_name = "foo"] diff --git a/tests/rustdoc/type-layout.rs b/tests/rustdoc/type-layout.rs index bd88e73af5cb..05f8e4dc9e9e 100644 --- a/tests/rustdoc/type-layout.rs +++ b/tests/rustdoc/type-layout.rs @@ -1,4 +1,4 @@ -// compile-flags: --show-type-layout -Z unstable-options +//@ compile-flags: --show-type-layout -Z unstable-options // @hasraw type_layout/struct.Foo.html 'Size: ' // @hasraw - ' bytes' diff --git a/tests/rustdoc/typedef-inner-variants.rs b/tests/rustdoc/typedef-inner-variants.rs index 4d0ff85551ce..d87a1cb6facb 100644 --- a/tests/rustdoc/typedef-inner-variants.rs +++ b/tests/rustdoc/typedef-inner-variants.rs @@ -3,7 +3,7 @@ #![crate_name = "inner_variants"] -// aux-build:cross_crate_generic_typedef.rs +//@ aux-build:cross_crate_generic_typedef.rs extern crate cross_crate_generic_typedef; pub struct Adt; diff --git a/tests/rustdoc/unit-return.rs b/tests/rustdoc/unit-return.rs index 6ddfa0c4d5ca..47a3e6d490be 100644 --- a/tests/rustdoc/unit-return.rs +++ b/tests/rustdoc/unit-return.rs @@ -1,4 +1,4 @@ -// aux-build:unit-return.rs +//@ aux-build:unit-return.rs #![crate_name = "foo"] diff --git a/tests/rustdoc/use-attr.rs b/tests/rustdoc/use-attr.rs index 996b7bba6218..68e44bdfdc40 100644 --- a/tests/rustdoc/use-attr.rs +++ b/tests/rustdoc/use-attr.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // ICE when rustdoc encountered a use statement of a non-macro attribute (see #58054) diff --git a/tests/rustdoc/visibility.rs b/tests/rustdoc/visibility.rs index 4f9b06fd7a20..87ac9a9b74d1 100644 --- a/tests/rustdoc/visibility.rs +++ b/tests/rustdoc/visibility.rs @@ -1,4 +1,4 @@ -// compile-flags: --document-private-items +//@ compile-flags: --document-private-items #![crate_name = "foo"] #![feature(inherent_associated_types)] diff --git a/tests/ui-fulldeps/auxiliary/syntax-extension-with-dll-deps-1.rs b/tests/ui-fulldeps/auxiliary/syntax-extension-with-dll-deps-1.rs index 8b00fb81cd25..0fa1da4a70a5 100644 --- a/tests/ui-fulldeps/auxiliary/syntax-extension-with-dll-deps-1.rs +++ b/tests/ui-fulldeps/auxiliary/syntax-extension-with-dll-deps-1.rs @@ -1,4 +1,4 @@ -// force-host +//@ force-host #![crate_type = "dylib"] diff --git a/tests/ui-fulldeps/compiler-calls.rs b/tests/ui-fulldeps/compiler-calls.rs index b6d3b7b040d1..f6c10add2906 100644 --- a/tests/ui-fulldeps/compiler-calls.rs +++ b/tests/ui-fulldeps/compiler-calls.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass // Test that the Callbacks interface to the compiler works. -// ignore-cross-compile -// ignore-remote +//@ ignore-cross-compile +//@ ignore-remote #![feature(rustc_private)] diff --git a/tests/ui-fulldeps/deriving-global.rs b/tests/ui-fulldeps/deriving-global.rs index 9c0fc13a5e2f..7783010be441 100644 --- a/tests/ui-fulldeps/deriving-global.rs +++ b/tests/ui-fulldeps/deriving-global.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(rustc_private)] diff --git a/tests/ui-fulldeps/deriving-hygiene.rs b/tests/ui-fulldeps/deriving-hygiene.rs index 48d3355b9d54..a3a6f9e022eb 100644 --- a/tests/ui-fulldeps/deriving-hygiene.rs +++ b/tests/ui-fulldeps/deriving-hygiene.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_upper_case_globals)] #![feature(rustc_private)] diff --git a/tests/ui-fulldeps/dropck_tarena_sound_drop.rs b/tests/ui-fulldeps/dropck_tarena_sound_drop.rs index ffad80171da7..5f5d60926efd 100644 --- a/tests/ui-fulldeps/dropck_tarena_sound_drop.rs +++ b/tests/ui-fulldeps/dropck_tarena_sound_drop.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unknown_lints)] // Check that an arena (TypedArena) can carry elements whose drop diff --git a/tests/ui-fulldeps/empty-struct-braces-derive.rs b/tests/ui-fulldeps/empty-struct-braces-derive.rs index 3637610af0d9..2a1e7ee0955a 100644 --- a/tests/ui-fulldeps/empty-struct-braces-derive.rs +++ b/tests/ui-fulldeps/empty-struct-braces-derive.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // `#[derive(Trait)]` works for empty structs/variants with braces or parens. #![feature(rustc_private)] diff --git a/tests/ui-fulldeps/fluent-messages/test.rs b/tests/ui-fulldeps/fluent-messages/test.rs index 89ac48f36db5..2316a5334696 100644 --- a/tests/ui-fulldeps/fluent-messages/test.rs +++ b/tests/ui-fulldeps/fluent-messages/test.rs @@ -1,4 +1,4 @@ -// normalize-stderr-test "could not open Fluent resource:.*" -> "could not open Fluent resource: os-specific message" +//@ normalize-stderr-test "could not open Fluent resource:.*" -> "could not open Fluent resource: os-specific message" #![feature(rustc_private)] #![crate_type = "lib"] diff --git a/tests/ui-fulldeps/hash-stable-is-unstable.rs b/tests/ui-fulldeps/hash-stable-is-unstable.rs index ab18f2c6415e..3f280ec0a60f 100644 --- a/tests/ui-fulldeps/hash-stable-is-unstable.rs +++ b/tests/ui-fulldeps/hash-stable-is-unstable.rs @@ -1,5 +1,5 @@ -// ignore-stage1 -// compile-flags: -Zdeduplicate-diagnostics=yes +//@ ignore-stage1 +//@ compile-flags: -Zdeduplicate-diagnostics=yes extern crate rustc_data_structures; //~^ use of unstable library feature 'rustc_private' //~| NOTE: issue #27812 for more information diff --git a/tests/ui-fulldeps/internal-lints/bad_opt_access.rs b/tests/ui-fulldeps/internal-lints/bad_opt_access.rs index d6bd6945e150..708c3651b87b 100644 --- a/tests/ui-fulldeps/internal-lints/bad_opt_access.rs +++ b/tests/ui-fulldeps/internal-lints/bad_opt_access.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z unstable-options +//@ compile-flags: -Z unstable-options // Test that accessing command line options by field access triggers a lint for those fields // that have wrapper functions which should be used. diff --git a/tests/ui-fulldeps/internal-lints/default_hash_types.rs b/tests/ui-fulldeps/internal-lints/default_hash_types.rs index 795c7d2dcb73..bfafa8c5f27f 100644 --- a/tests/ui-fulldeps/internal-lints/default_hash_types.rs +++ b/tests/ui-fulldeps/internal-lints/default_hash_types.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z unstable-options +//@ compile-flags: -Z unstable-options #![feature(rustc_private)] #![deny(rustc::default_hash_types)] diff --git a/tests/ui-fulldeps/internal-lints/diagnostics.rs b/tests/ui-fulldeps/internal-lints/diagnostics.rs index dcf948d2a88f..42270d2bbdea 100644 --- a/tests/ui-fulldeps/internal-lints/diagnostics.rs +++ b/tests/ui-fulldeps/internal-lints/diagnostics.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z unstable-options +//@ compile-flags: -Z unstable-options #![crate_type = "lib"] #![feature(rustc_attrs)] diff --git a/tests/ui-fulldeps/internal-lints/lint_pass_impl_without_macro.rs b/tests/ui-fulldeps/internal-lints/lint_pass_impl_without_macro.rs index fa6734b6c6c3..c3df917ed12d 100644 --- a/tests/ui-fulldeps/internal-lints/lint_pass_impl_without_macro.rs +++ b/tests/ui-fulldeps/internal-lints/lint_pass_impl_without_macro.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z unstable-options +//@ compile-flags: -Z unstable-options #![feature(rustc_private)] #![deny(rustc::lint_pass_impl_without_macro)] diff --git a/tests/ui-fulldeps/internal-lints/qualified_ty_ty_ctxt.rs b/tests/ui-fulldeps/internal-lints/qualified_ty_ty_ctxt.rs index 32b987338c05..c44870158f89 100644 --- a/tests/ui-fulldeps/internal-lints/qualified_ty_ty_ctxt.rs +++ b/tests/ui-fulldeps/internal-lints/qualified_ty_ty_ctxt.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z unstable-options +//@ compile-flags: -Z unstable-options #![feature(rustc_private)] #![deny(rustc::usage_of_qualified_ty)] diff --git a/tests/ui-fulldeps/internal-lints/query_stability.rs b/tests/ui-fulldeps/internal-lints/query_stability.rs index 627ffa5cbd0f..7b897fabd2d8 100644 --- a/tests/ui-fulldeps/internal-lints/query_stability.rs +++ b/tests/ui-fulldeps/internal-lints/query_stability.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z unstable-options +//@ compile-flags: -Z unstable-options #![feature(rustc_private)] #![deny(rustc::potential_query_instability)] diff --git a/tests/ui-fulldeps/internal-lints/rustc_pass_by_value.rs b/tests/ui-fulldeps/internal-lints/rustc_pass_by_value.rs index 10bab2d889a6..06d2232be517 100644 --- a/tests/ui-fulldeps/internal-lints/rustc_pass_by_value.rs +++ b/tests/ui-fulldeps/internal-lints/rustc_pass_by_value.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z unstable-options +//@ compile-flags: -Z unstable-options #![feature(rustc_attrs)] #![feature(rustc_private)] diff --git a/tests/ui-fulldeps/internal-lints/span_use_eq_ctxt.rs b/tests/ui-fulldeps/internal-lints/span_use_eq_ctxt.rs index 39980ee7c672..369c2dd9c487 100644 --- a/tests/ui-fulldeps/internal-lints/span_use_eq_ctxt.rs +++ b/tests/ui-fulldeps/internal-lints/span_use_eq_ctxt.rs @@ -1,5 +1,5 @@ // Test the `rustc::span_use_eq_ctxt` internal lint -// compile-flags: -Z unstable-options +//@ compile-flags: -Z unstable-options #![feature(rustc_private)] #![deny(rustc::span_use_eq_ctxt)] diff --git a/tests/ui-fulldeps/internal-lints/ty_tykind_usage.rs b/tests/ui-fulldeps/internal-lints/ty_tykind_usage.rs index cce223c77bba..3152bf23ca56 100644 --- a/tests/ui-fulldeps/internal-lints/ty_tykind_usage.rs +++ b/tests/ui-fulldeps/internal-lints/ty_tykind_usage.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z unstable-options +//@ compile-flags: -Z unstable-options #![feature(rustc_private)] diff --git a/tests/ui-fulldeps/lint-pass-macros.rs b/tests/ui-fulldeps/lint-pass-macros.rs index 4c61783418fb..093097fe513d 100644 --- a/tests/ui-fulldeps/lint-pass-macros.rs +++ b/tests/ui-fulldeps/lint-pass-macros.rs @@ -1,5 +1,5 @@ -// compile-flags: -Z unstable-options -// check-pass +//@ compile-flags: -Z unstable-options +//@ check-pass #![feature(rustc_private)] diff --git a/tests/ui-fulldeps/missing-rustc-driver-error.rs b/tests/ui-fulldeps/missing-rustc-driver-error.rs index b627a207c985..adc3e701cc0e 100644 --- a/tests/ui-fulldeps/missing-rustc-driver-error.rs +++ b/tests/ui-fulldeps/missing-rustc-driver-error.rs @@ -1,8 +1,8 @@ // Test that we get the following hint when trying to use a compiler crate without rustc_driver. -// error-pattern: try adding `extern crate rustc_driver;` at the top level of this crate -// compile-flags: --emit link -// normalize-stderr-test ".*crate .* required.*\n\n" -> "" -// normalize-stderr-test: "aborting due to [0-9]+" -> "aborting due to NUMBER" +//@ error-pattern: try adding `extern crate rustc_driver;` at the top level of this crate +//@ compile-flags: --emit link +//@ normalize-stderr-test ".*crate .* required.*\n\n" -> "" +//@ normalize-stderr-test: "aborting due to [0-9]+" -> "aborting due to NUMBER" #![feature(rustc_private)] diff --git a/tests/ui-fulldeps/mod_dir_path_canonicalized.rs b/tests/ui-fulldeps/mod_dir_path_canonicalized.rs index ddc86c1dc312..8ffc4669ee27 100644 --- a/tests/ui-fulldeps/mod_dir_path_canonicalized.rs +++ b/tests/ui-fulldeps/mod_dir_path_canonicalized.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass // Testing that a librustc_ast can parse modules with canonicalized base path -// ignore-cross-compile -// ignore-remote +//@ ignore-cross-compile +//@ ignore-remote // no-remap-src-base: Reading `file!()` (expectedly) fails when enabled. #![feature(rustc_private)] diff --git a/tests/ui-fulldeps/mod_dir_simple/test.rs b/tests/ui-fulldeps/mod_dir_simple/test.rs index 35e26093a2d6..1e9b18150204 100644 --- a/tests/ui-fulldeps/mod_dir_simple/test.rs +++ b/tests/ui-fulldeps/mod_dir_simple/test.rs @@ -1,3 +1,3 @@ -// run-pass +//@ run-pass pub fn foo() -> isize { 10 } diff --git a/tests/ui-fulldeps/pathless-extern-unstable.rs b/tests/ui-fulldeps/pathless-extern-unstable.rs index 719ca3c5a65b..8ef8761d5a28 100644 --- a/tests/ui-fulldeps/pathless-extern-unstable.rs +++ b/tests/ui-fulldeps/pathless-extern-unstable.rs @@ -1,6 +1,6 @@ -// edition:2018 -// ignore-stage1 -// compile-flags:--extern rustc_middle +//@ edition:2018 +//@ ignore-stage1 +//@ compile-flags:--extern rustc_middle // Test that `--extern rustc_middle` fails with `rustc_private`. diff --git a/tests/ui-fulldeps/pprust-expr-roundtrip.rs b/tests/ui-fulldeps/pprust-expr-roundtrip.rs index 24c4543c20cc..e1c326c6a915 100644 --- a/tests/ui-fulldeps/pprust-expr-roundtrip.rs +++ b/tests/ui-fulldeps/pprust-expr-roundtrip.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-cross-compile +//@ run-pass +//@ ignore-cross-compile // The general idea of this test is to enumerate all "interesting" expressions and check that // `parse(print(e)) == e` for all `e`. Here's what's interesting, for the purposes of this test: diff --git a/tests/ui-fulldeps/regions-mock-tcx.rs b/tests/ui-fulldeps/regions-mock-tcx.rs index 63975ef62c59..970f08377a69 100644 --- a/tests/ui-fulldeps/regions-mock-tcx.rs +++ b/tests/ui-fulldeps/regions-mock-tcx.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_imports)] diff --git a/tests/ui-fulldeps/rustc_encodable_hygiene.rs b/tests/ui-fulldeps/rustc_encodable_hygiene.rs index 36c684a131e6..4486cb9dc608 100644 --- a/tests/ui-fulldeps/rustc_encodable_hygiene.rs +++ b/tests/ui-fulldeps/rustc_encodable_hygiene.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(rustc_private)] diff --git a/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-doc-comment-field.rs b/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-doc-comment-field.rs index 221f26f8edc4..90bea03ffd5e 100644 --- a/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-doc-comment-field.rs +++ b/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-doc-comment-field.rs @@ -1,14 +1,14 @@ -// check-fail +//@ check-fail // Tests that a doc comment will not preclude a field from being considered a diagnostic argument -// normalize-stderr-test "the following other types implement trait `IntoDiagnosticArg`:(?:.*\n){0,9}\s+and \d+ others" -> "normalized in stderr" -// normalize-stderr-test "(COMPILER_DIR/.*\.rs):[0-9]+:[0-9]+" -> "$1:LL:CC" +//@ normalize-stderr-test "the following other types implement trait `IntoDiagnosticArg`:(?:.*\n){0,9}\s+and \d+ others" -> "normalized in stderr" +//@ normalize-stderr-test "(COMPILER_DIR/.*\.rs):[0-9]+:[0-9]+" -> "$1:LL:CC" // The proc_macro2 crate handles spans differently when on beta/stable release rather than nightly, // changing the output of this test. Since Subdiagnostic is strictly internal to the compiler // the test is just ignored on stable and beta: -// ignore-stage1 -// ignore-beta -// ignore-stable +//@ ignore-stage1 +//@ ignore-beta +//@ ignore-stable #![feature(rustc_private)] #![crate_type = "lib"] diff --git a/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs b/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs index 856f32fafa02..f2f42f054817 100644 --- a/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs +++ b/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs @@ -1,14 +1,14 @@ -// check-fail +//@ check-fail // Tests error conditions for specifying diagnostics using #[derive(Diagnostic)] -// normalize-stderr-test "the following other types implement trait `IntoDiagnosticArg`:(?:.*\n){0,9}\s+and \d+ others" -> "normalized in stderr" -// normalize-stderr-test "(COMPILER_DIR/.*\.rs):[0-9]+:[0-9]+" -> "$1:LL:CC" +//@ normalize-stderr-test "the following other types implement trait `IntoDiagnosticArg`:(?:.*\n){0,9}\s+and \d+ others" -> "normalized in stderr" +//@ normalize-stderr-test "(COMPILER_DIR/.*\.rs):[0-9]+:[0-9]+" -> "$1:LL:CC" // The proc_macro2 crate handles spans differently when on beta/stable release rather than nightly, // changing the output of this test. Since Diagnostic is strictly internal to the compiler // the test is just ignored on stable and beta: -// ignore-stage1 -// ignore-beta -// ignore-stable +//@ ignore-stage1 +//@ ignore-beta +//@ ignore-stable #![feature(rustc_private)] #![crate_type = "lib"] diff --git a/tests/ui-fulldeps/session-diagnostic/enforce_slug_naming.rs b/tests/ui-fulldeps/session-diagnostic/enforce_slug_naming.rs index 3056ebb7575f..6402b00ef0a9 100644 --- a/tests/ui-fulldeps/session-diagnostic/enforce_slug_naming.rs +++ b/tests/ui-fulldeps/session-diagnostic/enforce_slug_naming.rs @@ -1,4 +1,4 @@ -// rustc-env:CARGO_CRATE_NAME=rustc_dummy +//@ rustc-env:CARGO_CRATE_NAME=rustc_dummy #![feature(rustc_private)] #![crate_type = "lib"] diff --git a/tests/ui-fulldeps/session-diagnostic/invalid-variable.rs b/tests/ui-fulldeps/session-diagnostic/invalid-variable.rs index 2ec07fa14203..ba529e42e786 100644 --- a/tests/ui-fulldeps/session-diagnostic/invalid-variable.rs +++ b/tests/ui-fulldeps/session-diagnostic/invalid-variable.rs @@ -1,5 +1,5 @@ -// run-fail -// compile-flags: --test +//@ run-fail +//@ compile-flags: --test // test that messages referencing non-existent fields cause test failures #![feature(rustc_private)] diff --git a/tests/ui-fulldeps/session-diagnostic/subdiagnostic-derive.rs b/tests/ui-fulldeps/session-diagnostic/subdiagnostic-derive.rs index 74cf91db7a7c..15e3b212d904 100644 --- a/tests/ui-fulldeps/session-diagnostic/subdiagnostic-derive.rs +++ b/tests/ui-fulldeps/session-diagnostic/subdiagnostic-derive.rs @@ -1,12 +1,12 @@ -// check-fail +//@ check-fail // Tests error conditions for specifying subdiagnostics using #[derive(Subdiagnostic)] // The proc_macro2 crate handles spans differently when on beta/stable release rather than nightly, // changing the output of this test. Since Subdiagnostic is strictly internal to the compiler // the test is just ignored on stable and beta: -// ignore-stage1 -// ignore-beta -// ignore-stable +//@ ignore-stage1 +//@ ignore-beta +//@ ignore-stable #![feature(rustc_private)] #![crate_type = "lib"] diff --git a/tests/ui-fulldeps/stable-mir/check_abi.rs b/tests/ui-fulldeps/stable-mir/check_abi.rs index 7d7469597afc..c345987955ef 100644 --- a/tests/ui-fulldeps/stable-mir/check_abi.rs +++ b/tests/ui-fulldeps/stable-mir/check_abi.rs @@ -1,10 +1,10 @@ -// run-pass +//@ run-pass //! Test information regarding type layout. -// ignore-stage1 -// ignore-cross-compile -// ignore-remote -// ignore-windows-gnu mingw has troubles with linking https://github.com/rust-lang/rust/pull/116837 +//@ ignore-stage1 +//@ ignore-cross-compile +//@ ignore-remote +//@ ignore-windows-gnu mingw has troubles with linking https://github.com/rust-lang/rust/pull/116837 #![feature(rustc_private)] #![feature(assert_matches)] diff --git a/tests/ui-fulldeps/stable-mir/check_allocation.rs b/tests/ui-fulldeps/stable-mir/check_allocation.rs index fb5e13eb13b1..7752ff51ac81 100644 --- a/tests/ui-fulldeps/stable-mir/check_allocation.rs +++ b/tests/ui-fulldeps/stable-mir/check_allocation.rs @@ -1,12 +1,12 @@ -// run-pass +//@ run-pass //! Test that users are able to use stable mir APIs to retrieve information of global allocations //! such as `vtable_allocation`. -// ignore-stage1 -// ignore-cross-compile -// ignore-remote -// ignore-windows-gnu mingw has troubles with linking https://github.com/rust-lang/rust/pull/116837 -// edition: 2021 +//@ ignore-stage1 +//@ ignore-cross-compile +//@ ignore-remote +//@ ignore-windows-gnu mingw has troubles with linking https://github.com/rust-lang/rust/pull/116837 +//@ edition: 2021 #![feature(rustc_private)] #![feature(assert_matches)] diff --git a/tests/ui-fulldeps/stable-mir/check_defs.rs b/tests/ui-fulldeps/stable-mir/check_defs.rs index 4a124adb2b60..27b9b059c209 100644 --- a/tests/ui-fulldeps/stable-mir/check_defs.rs +++ b/tests/ui-fulldeps/stable-mir/check_defs.rs @@ -1,11 +1,11 @@ -// run-pass +//@ run-pass //! Test that users are able to use stable mir APIs to retrieve information about crate definitions. -// ignore-stage1 -// ignore-cross-compile -// ignore-remote -// ignore-windows-gnu mingw has troubles with linking https://github.com/rust-lang/rust/pull/116837 -// edition: 2021 +//@ ignore-stage1 +//@ ignore-cross-compile +//@ ignore-remote +//@ ignore-windows-gnu mingw has troubles with linking https://github.com/rust-lang/rust/pull/116837 +//@ edition: 2021 #![feature(rustc_private)] #![feature(assert_matches)] diff --git a/tests/ui-fulldeps/stable-mir/check_foreign.rs b/tests/ui-fulldeps/stable-mir/check_foreign.rs index e6c59354d5e2..06d2af4ac8a3 100644 --- a/tests/ui-fulldeps/stable-mir/check_foreign.rs +++ b/tests/ui-fulldeps/stable-mir/check_foreign.rs @@ -1,11 +1,11 @@ -// run-pass +//@ run-pass //! Test retrieval and kinds of foreign items. -// ignore-stage1 -// ignore-cross-compile -// ignore-remote -// ignore-windows-gnu mingw has troubles with linking https://github.com/rust-lang/rust/pull/116837 -// edition: 2021 +//@ ignore-stage1 +//@ ignore-cross-compile +//@ ignore-remote +//@ ignore-windows-gnu mingw has troubles with linking https://github.com/rust-lang/rust/pull/116837 +//@ edition: 2021 #![feature(rustc_private)] #![feature(assert_matches)] diff --git a/tests/ui-fulldeps/stable-mir/check_instance.rs b/tests/ui-fulldeps/stable-mir/check_instance.rs index 1e039e5ae514..218c7b3e3863 100644 --- a/tests/ui-fulldeps/stable-mir/check_instance.rs +++ b/tests/ui-fulldeps/stable-mir/check_instance.rs @@ -1,11 +1,11 @@ -// run-pass +//@ run-pass //! Test that users are able to use stable mir APIs to retrieve monomorphized instances -// ignore-stage1 -// ignore-cross-compile -// ignore-remote -// ignore-windows-gnu mingw has troubles with linking https://github.com/rust-lang/rust/pull/116837 -// edition: 2021 +//@ ignore-stage1 +//@ ignore-cross-compile +//@ ignore-remote +//@ ignore-windows-gnu mingw has troubles with linking https://github.com/rust-lang/rust/pull/116837 +//@ edition: 2021 #![feature(rustc_private)] #![feature(assert_matches)] diff --git a/tests/ui-fulldeps/stable-mir/check_item_kind.rs b/tests/ui-fulldeps/stable-mir/check_item_kind.rs index 0a7f00029f2a..1d5b19304c1f 100644 --- a/tests/ui-fulldeps/stable-mir/check_item_kind.rs +++ b/tests/ui-fulldeps/stable-mir/check_item_kind.rs @@ -1,11 +1,11 @@ -// run-pass +//@ run-pass //! Test that item kind works as expected. -// ignore-stage1 -// ignore-cross-compile -// ignore-remote -// ignore-windows-gnu mingw has troubles with linking https://github.com/rust-lang/rust/pull/116837 -// edition: 2021 +//@ ignore-stage1 +//@ ignore-cross-compile +//@ ignore-remote +//@ ignore-windows-gnu mingw has troubles with linking https://github.com/rust-lang/rust/pull/116837 +//@ edition: 2021 #![feature(rustc_private)] #![feature(assert_matches)] diff --git a/tests/ui-fulldeps/stable-mir/check_trait_queries.rs b/tests/ui-fulldeps/stable-mir/check_trait_queries.rs index c9fbe15ffb03..5098547c2c8d 100644 --- a/tests/ui-fulldeps/stable-mir/check_trait_queries.rs +++ b/tests/ui-fulldeps/stable-mir/check_trait_queries.rs @@ -1,11 +1,11 @@ -// run-pass +//@ run-pass //! Test that users are able to retrieve information about trait declarations and implementations. -// ignore-stage1 -// ignore-cross-compile -// ignore-remote -// ignore-windows-gnu mingw has troubles with linking https://github.com/rust-lang/rust/pull/116837 -// edition: 2021 +//@ ignore-stage1 +//@ ignore-cross-compile +//@ ignore-remote +//@ ignore-windows-gnu mingw has troubles with linking https://github.com/rust-lang/rust/pull/116837 +//@ edition: 2021 #![feature(rustc_private)] #![feature(assert_matches)] diff --git a/tests/ui-fulldeps/stable-mir/check_ty_fold.rs b/tests/ui-fulldeps/stable-mir/check_ty_fold.rs index 14cbf9e9f81f..0b8cfcf27fd9 100644 --- a/tests/ui-fulldeps/stable-mir/check_ty_fold.rs +++ b/tests/ui-fulldeps/stable-mir/check_ty_fold.rs @@ -1,12 +1,12 @@ -// run-pass +//@ run-pass //! Test that users are able to use stable mir APIs to retrieve monomorphized types, and that //! we have an error handling for trying to instantiate types with incorrect arguments. -// ignore-stage1 -// ignore-cross-compile -// ignore-remote -// ignore-windows-gnu mingw has troubles with linking https://github.com/rust-lang/rust/pull/116837 -// edition: 2021 +//@ ignore-stage1 +//@ ignore-cross-compile +//@ ignore-remote +//@ ignore-windows-gnu mingw has troubles with linking https://github.com/rust-lang/rust/pull/116837 +//@ edition: 2021 #![feature(rustc_private)] #![feature(assert_matches)] diff --git a/tests/ui-fulldeps/stable-mir/compilation-result.rs b/tests/ui-fulldeps/stable-mir/compilation-result.rs index cd61d599eb43..286bbd7c5947 100644 --- a/tests/ui-fulldeps/stable-mir/compilation-result.rs +++ b/tests/ui-fulldeps/stable-mir/compilation-result.rs @@ -1,11 +1,11 @@ -// run-pass +//@ run-pass // Test StableMIR behavior when different results are given -// ignore-stage1 -// ignore-cross-compile -// ignore-remote -// ignore-windows-gnu mingw has troubles with linking https://github.com/rust-lang/rust/pull/116837 -// edition: 2021 +//@ ignore-stage1 +//@ ignore-cross-compile +//@ ignore-remote +//@ ignore-windows-gnu mingw has troubles with linking https://github.com/rust-lang/rust/pull/116837 +//@ edition: 2021 #![feature(rustc_private)] #![feature(assert_matches)] diff --git a/tests/ui-fulldeps/stable-mir/crate-info.rs b/tests/ui-fulldeps/stable-mir/crate-info.rs index 8258883436f2..4c9a8a665b84 100644 --- a/tests/ui-fulldeps/stable-mir/crate-info.rs +++ b/tests/ui-fulldeps/stable-mir/crate-info.rs @@ -1,11 +1,11 @@ -// run-pass +//@ run-pass // Test that users are able to use stable mir APIs to retrieve information of the current crate -// ignore-stage1 -// ignore-cross-compile -// ignore-remote -// ignore-windows-gnu mingw has troubles with linking https://github.com/rust-lang/rust/pull/116837 -// edition: 2021 +//@ ignore-stage1 +//@ ignore-cross-compile +//@ ignore-remote +//@ ignore-windows-gnu mingw has troubles with linking https://github.com/rust-lang/rust/pull/116837 +//@ edition: 2021 #![feature(rustc_private)] #![feature(assert_matches)] diff --git a/tests/ui-fulldeps/stable-mir/projections.rs b/tests/ui-fulldeps/stable-mir/projections.rs index 40f2d901a2b2..d68e7d37950f 100644 --- a/tests/ui-fulldeps/stable-mir/projections.rs +++ b/tests/ui-fulldeps/stable-mir/projections.rs @@ -1,11 +1,11 @@ -// run-pass +//@ run-pass // Tests the Stable MIR projections API -// ignore-stage1 -// ignore-cross-compile -// ignore-remote -// ignore-windows-gnu mingw has troubles with linking https://github.com/rust-lang/rust/pull/116837 -// edition: 2021 +//@ ignore-stage1 +//@ ignore-cross-compile +//@ ignore-remote +//@ ignore-windows-gnu mingw has troubles with linking https://github.com/rust-lang/rust/pull/116837 +//@ edition: 2021 #![feature(rustc_private)] #![feature(assert_matches)] diff --git a/tests/ui-fulldeps/stable-mir/smir_internal.rs b/tests/ui-fulldeps/stable-mir/smir_internal.rs index e23b0f6820a7..07f404fd471c 100644 --- a/tests/ui-fulldeps/stable-mir/smir_internal.rs +++ b/tests/ui-fulldeps/stable-mir/smir_internal.rs @@ -1,12 +1,12 @@ -// run-pass +//@ run-pass //! Test that users are able to use retrieve internal constructs from stable ones to help with //! the migration. -// ignore-stage1 -// ignore-cross-compile -// ignore-remote -// ignore-windows-gnu mingw has troubles with linking https://github.com/rust-lang/rust/pull/116837 -// edition: 2021 +//@ ignore-stage1 +//@ ignore-cross-compile +//@ ignore-remote +//@ ignore-windows-gnu mingw has troubles with linking https://github.com/rust-lang/rust/pull/116837 +//@ edition: 2021 #![feature(rustc_private)] #![feature(assert_matches)] diff --git a/tests/ui-fulldeps/stable-mir/smir_visitor.rs b/tests/ui-fulldeps/stable-mir/smir_visitor.rs index d7739770b706..ac428c80e0f1 100644 --- a/tests/ui-fulldeps/stable-mir/smir_visitor.rs +++ b/tests/ui-fulldeps/stable-mir/smir_visitor.rs @@ -1,11 +1,11 @@ -// run-pass +//@ run-pass //! Sanity check Stable MIR Visitor -// ignore-stage1 -// ignore-cross-compile -// ignore-remote -// ignore-windows-gnu mingw has troubles with linking https://github.com/rust-lang/rust/pull/116837 -// edition: 2021 +//@ ignore-stage1 +//@ ignore-cross-compile +//@ ignore-remote +//@ ignore-windows-gnu mingw has troubles with linking https://github.com/rust-lang/rust/pull/116837 +//@ edition: 2021 #![feature(rustc_private)] #![feature(assert_matches)]